Commit 2595514
Changed files (3)
src
domain
src/domain/Greeting.cs
@@ -6,5 +6,8 @@
{
return "hello";
}
+ public string Goodbye(){
+ return "goodbye";
+ }
}
}
src/test/CalculatorSpecs.cs
@@ -0,0 +1,8 @@
+
+using domain
+{
+ public class CalculatorSpecs
+ {
+
+ }
+}
src/test/GreetingSpecs.cs
@@ -5,22 +5,41 @@
public class GreetingSpecs
{
- Establish context = () =>
- {
- sut = new Greeting();
- };
-
- Because of = () =>
- {
- result = sut.Hello();
- };
-
- It should_say_hello = () =>
- {
- result.ShouldEqual("hello");
- };
-
- static Greeting sut;
- static string result;
+ Establish context = () =>
+ {
+ sut = new Greeting();
+ };
+
+ public class when_greeting_someone
+ {
+ Because of = () =>
+ {
+ result = sut.Hello();
+ };
+
+ It should_say_hello = () =>
+ {
+ result.ShouldEqual("hello");
+ };
+
+ static string result;
+ }
+
+ public class when_saying_goodbye
+ {
+ Because of = () =>
+ {
+ result = sut.Goodbye();
+ };
+
+ It should_say_goodbye = () =>
+ {
+ result.ShouldEqual("goodbye");
+ };
+
+ static string result;
+ }
+
+ static Greeting sut;
}
}