main
 1using Machine.Specifications;
 2using solidware.financials.service.domain.accounting;
 3
 4namespace specs.unit.service.domain.accounting
 5{
 6    public class BOEDSpecs
 7    {
 8        public abstract class concern 
 9        {
10            Establish context = () =>
11            {
12                sut = new BOED();
13            };
14
15            Cleanup clean = () =>
16            {
17                SimpleUnitOfMeasure.provide_rate((x, y) => ConversionRatio.Default);
18            };
19
20            static protected BOED sut;
21        }
22
23        [Concern(typeof (BOED))]
24        public class when_converting_one_barrel_of_oil_equivalent_to_one_mcf : concern
25        {
26            Establish c = () =>
27            {
28                SimpleUnitOfMeasure.provide_rate((x, y) =>
29                {
30                    return new ConversionRatio(6);
31                });
32            };
33
34            Because b = () =>
35            {
36                result = sut.convert(1, new MCF());
37            };
38
39            It should_return_the_corrent_value = () =>
40            {
41                result.should_be_equal_to(6);
42            };
43
44            static decimal result;
45        }
46    }
47}