main
 1using System.Collections.Generic;
 2using System.Linq;
 3using developwithpassion.bdd.contexts;
 4using developwithpassion.bdd.mbunit;
 5using developwithpassion.bdd.mbunit.standard.observations;
 6using mars.rover.common;
 7
 8namespace specifications.common
 9{
10    public class DefaultRegistrySpecs
11    {
12    }
13
14    public class when_retrieving_all_the_items_added_to_a_registry :
15        observations_for_a_sut_with_a_contract<Registry<int>, DefaultRegistry<int>>
16    {
17        it should_return_each_item_that_was_added = () =>
18                                                        {
19                                                            sut.Count().should_be_equal_to(2);
20                                                            results.should_contain(1);
21                                                            results.should_contain(2);
22                                                        };
23
24        because b = () => { results = sut.all(); };
25
26        public override Registry<int> create_sut()
27        {
28            return new DefaultRegistry<int> {1, 2};
29        }
30
31        static IEnumerable<int> results;
32    }
33}