Skip to content

Instantly share code, notes, and snippets.

View jcockhren's full-sized avatar
👨‍🍳
Cooking up something 🔥

Jurnell Cockhren jcockhren

👨‍🍳
Cooking up something 🔥
View GitHub Profile
http://stephenwalther.com/archive/2008/06/12/tdd-introduction-to-moq
@jcockhren
jcockhren / oct-26-mvc1.md
Last active October 27, 2015 01:05
Week of Oct 26th .NET MVC Assignments

Week of Oct 26th .NET MVC Assignments

Assignment 1 (Oct 31st)

(Re)Do sections 1-3 of Getting Started with Entity Framework 6 Code First using MVC 5

Notes

  1. Do not download the finished project. Walkthrough the entire process including the creation of the project.
  2. Inform any of your classmates who are not in class of the assignment
@jcockhren
jcockhren / simplecalc-4.md
Last active October 20, 2015 01:16
Simple Calculator chunk 4 - Constants

Simple Calculator chunk 4 - Constants

Goal

Using Test Driven Development, expand your Stack class to handle the storage and retreival of constants.

  1. Prove that any lowercase letter of the alphabet can be a constant. (e.g. 'a' or 'x'). Constant names are case insensitive.
  2. Prove that your constants can only be defined once per session. Throw an exception otherwise.
  3. Prove you can defined constants can be used in math expressions.
  4. Prove that undefined constants can not be used and doing so throws an exception.
@jcockhren
jcockhren / simplecalc-3.md
Last active October 17, 2015 16:53
Simple Calculator chunk 3 - Calculator Commands

Simple Calculator chunk 3 - Calculator Commands

Goal

Using Test Driven Development, create a Stack class that can hold the last evaluated expression (for lastq) and the last answer returned (for last). Also, modify your Evaluate class appropriatly handle the last and lastq commands.

  1. Ensure your Stack class can easily set the lastq and last (you can name your properties whatever you want)
  2. Prove your Evaluate class can properly handle the lastq and last commands.
@jcockhren
jcockhren / simplecalc-2.md
Created October 15, 2015 00:54
Simple Calculator Chunk 2 - Evaluting Simple Expressions

Simple Calculator Chunk 2 - Evaluting Simple Expressions

Goal

Using Test Driven Development, create a Evaluate class that can evaluate a simple 2-term calculator expression, returning the appropriate answer.

  1. Prove your class can execute the correct operation of a GOOD expression. (If you already have classes for the various math operations, this is easy).
  2. Prove your class can handle a BAD expression.

Questions

@jcockhren
jcockhren / simplecalc-1.md
Last active February 20, 2016 13:49
Simple Calculator chunk 1 - Parsing Text

Simple Calculator chunk 1 - Parsing Text

Goal

Using Test Driven Development, create a Parse class that will break down a simple 2-term calculator expression.

  1. Prove you can extract the terms of the expression.
  2. Prove you can extract the operation embedded in the expression.
  3. Ensure you have examples of GOOD and BAD input and have the class throw an exception where there are error.
@jcockhren
jcockhren / gist:aeb5f0daab45876fbd6c
Created October 8, 2015 01:28
SpeedCoding Vehicle Class
# Create A Contrete Vehicle Class
@jcockhren
jcockhren / provisioner_test.rb
Created October 1, 2015 00:29
Base example of provisioner testing for saltstack
require_relative "../../../base"
require Vagrant.source_root.join("plugins/provisioners/salt/config")
require Vagrant.source_root.join("plugins/provisioners/salt/provisioner")
describe VagrantPlugins::Salt::Provisioner do
include_context "unit"
subject { described_class.new(machine, config) }
public class Main : Shape
{
public Main() : base() {}
}
@jcockhren
jcockhren / top.sls
Created August 13, 2015 14:22
Compount matcher salt
base:
'* and not mynodegroup':
- match: compound
- openvpn
- ssh