summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-03-27 10:50:29 -0600
committermo k <mo@mokhan.ca>2012-03-27 10:50:29 -0600
commit259551422613efb020822133e49af93348c312dd (patch)
tree803f3cce77cb1178ab38bdf6718e85d1a3927dc0
parentc29dd665b844d62a59c880f797680437bd661932 (diff)
add some fluff tests.
-rwxr-xr-xsrc/domain/Greeting.cs3
-rwxr-xr-xsrc/test/CalculatorSpecs.cs8
-rwxr-xr-xsrc/test/GreetingSpecs.cs53
3 files changed, 47 insertions, 17 deletions
diff --git a/src/domain/Greeting.cs b/src/domain/Greeting.cs
index 6813728..1125be1 100755
--- a/src/domain/Greeting.cs
+++ b/src/domain/Greeting.cs
@@ -6,5 +6,8 @@
{
return "hello";
}
+ public string Goodbye(){
+ return "goodbye";
+ }
}
}
diff --git a/src/test/CalculatorSpecs.cs b/src/test/CalculatorSpecs.cs
new file mode 100755
index 0000000..4b674da
--- /dev/null
+++ b/src/test/CalculatorSpecs.cs
@@ -0,0 +1,8 @@
+
+using domain
+{
+ public class CalculatorSpecs
+ {
+
+ }
+}
diff --git a/src/test/GreetingSpecs.cs b/src/test/GreetingSpecs.cs
index 798b00a..764a688 100755
--- a/src/test/GreetingSpecs.cs
+++ b/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;
}
}