main
 1using Machine.Specifications;
 2using solidware.financials.service.domain.accounting;
 3
 4namespace specs.unit.service.domain.accounting
 5{
 6    public class QuantitySpecs
 7    {
 8        public abstract class concern
 9        {
10            Establish blah = () =>
11            {
12                sut = new Quantity(100, Currency.CAD);
13            };
14
15            static protected Quantity sut;
16        }
17
18        [Concern(typeof (Quantity))]
19        public class when_checking_if_two_quantities_are_equal : concern
20        {
21            It should_return_true_when_they_represent_the_same_amount_and_units = () =>
22            {
23                sut.should_be_equal_to(new Quantity(100, Currency.CAD));
24            };
25
26            It should_return_false_when_they_are_not_the_same_amount = () =>
27            {
28                sut.ShouldNotEqual(new Quantity(1, Currency.CAD));
29            };
30
31            It should_return_false_when_they_represent_different_currencies = () =>
32            {
33                sut.ShouldNotEqual(new Quantity(100, Currency.USD));
34            };
35        }
36    }
37}