Created
March 31, 2012 20:22
-
-
Save JamesTryand/2268131 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using Simple.Testing; | |
| using Simple.Testing.ClientFramework; | |
| namespace ClassLibrary1 | |
| { | |
| public class Class1 | |
| { | |
| public Specification When_I_enter_two_numbers_they_are_added() | |
| { | |
| return new QuerySpecification<ProfessorMonkeyBoy, MathResult>() | |
| { | |
| On = () => new ProfessorMonkeyBoy(), | |
| When = theProf => theProf.AddsSomeNumbers(2, 3), | |
| Expect = { | |
| result => result != null, | |
| result => result is MathResult, | |
| result => result.Value.Equals(5), | |
| }, | |
| }; | |
| } | |
| } | |
| public class ProfessorMonkeyBoy | |
| { | |
| public MathResult AddsSomeNumbers(int first, int second) | |
| { | |
| return new MathResult() { Value = first + second }; | |
| } | |
| } | |
| public class MathResult | |
| { | |
| public int Value { get; set; } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment