diff options
Diffstat (limited to 'product/database/transactions/ContextFactorySpecs.cs')
| -rw-r--r-- | product/database/transactions/ContextFactorySpecs.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/product/database/transactions/ContextFactorySpecs.cs b/product/database/transactions/ContextFactorySpecs.cs new file mode 100644 index 0000000..2e807af --- /dev/null +++ b/product/database/transactions/ContextFactorySpecs.cs @@ -0,0 +1,31 @@ +using System.Collections; +using developwithpassion.bdd.contexts; +using Gorilla.Commons.Testing; + +namespace momoney.database.transactions +{ + public class ContextFactorySpecs + { + } + + [Concern(typeof (ContextFactory))] + public class when_creating_a_new_context : concerns_for<IContextFactory, ContextFactory> + { + context c = () => + { + scope = an<IScopedStorage>(); + storage = an<IDictionary>(); + + when_the(scope).is_told_to(x => x.provide_storage()).it_will_return(storage); + }; + + because b = () => { result = sut.create_for(scope); }; + + it should_return_a_context_that_represents_the_specified_scope = + () => result.should_be_an_instance_of<Context>(); + + static IDictionary storage; + static IScopedStorage scope; + static IContext result; + } +}
\ No newline at end of file |
