main
1using Gorilla.Commons.Utility;
2
3namespace tests.unit.commons.utility
4{
5 public class DateSpecs {}
6
7 [Concern(typeof (Date))]
8 public class when_two_dates_that_represent_the_same_day_are_asked_if_they_are_equal : tests_for<Date>
9 {
10 it should_return_true = () => result.should_be_equal_to(true);
11
12 public override Date create_sut()
13 {
14 return new Date(2008, 09, 25);
15 }
16
17 because b = () =>
18 {
19 result = sut.Equals(new Date(2008, 09, 25));
20 };
21
22 static bool result;
23 }
24
25 [Concern(typeof (Date))]
26 public class when_an_older_date_is_compared_to_a_younger_date : tests_for<Date>
27 {
28 it should_return_a_positive_number = () => result.should_be_greater_than(0);
29
30 public override Date create_sut()
31 {
32 return new Date(2008, 09, 25);
33 }
34
35 because b = () =>
36 {
37 result = sut.CompareTo(new Date(2007, 01, 01));
38 };
39
40 static int result;
41 }
42}