main
 1using System.Collections;
 2using developwithpassion.bdd.contexts;
 3using Gorilla.Commons.Testing;
 4
 5namespace momoney.database.transactions
 6{
 7    public class ContextFactorySpecs
 8    {
 9    }
10
11    [Concern(typeof (ContextFactory))]
12    public class when_creating_a_new_context : concerns_for<IContextFactory, ContextFactory>
13    {
14        context c = () =>
15        {
16            scope = an<IScopedStorage>();
17            storage = an<IDictionary>();
18
19            when_the(scope).is_told_to(x => x.provide_storage()).it_will_return(storage);
20        };
21
22        because b = () => { result = sut.create_for(scope); };
23
24        it should_return_a_context_that_represents_the_specified_scope =
25            () => result.should_be_an_instance_of<Context>();
26
27        static IDictionary storage;
28        static IScopedStorage scope;
29        static IContext result;
30    }
31}