diff options
| author | unknown <mkhan@.arcresources.ca> | 2009-10-22 16:58:51 -0600 |
|---|---|---|
| committer | unknown <mkhan@.arcresources.ca> | 2009-10-22 16:58:51 -0600 |
| commit | 38421b7f4fd44975ddcc6bb3188cc9c4c7a27559 (patch) | |
| tree | 946ad17b8efd0a4b789cc16ce27b380d1eb6999d /product/database/transactions/PerThreadScopedStorageSpecs.cs | |
| parent | 2f3dd3f706e3f5097195f7bd4100c91458c1bea3 (diff) | |
cleaning up.
Diffstat (limited to 'product/database/transactions/PerThreadScopedStorageSpecs.cs')
| -rw-r--r-- | product/database/transactions/PerThreadScopedStorageSpecs.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/product/database/transactions/PerThreadScopedStorageSpecs.cs b/product/database/transactions/PerThreadScopedStorageSpecs.cs new file mode 100644 index 0000000..2f072a3 --- /dev/null +++ b/product/database/transactions/PerThreadScopedStorageSpecs.cs @@ -0,0 +1,34 @@ +using System.Collections; +using developwithpassion.bdd.contexts; +using Gorilla.Commons.Testing; + +namespace momoney.database.transactions +{ + public class PerThreadScopedStorageSpecs + { + [Concern(typeof (PerThreadScopedStorage))] + public class when_retrieving_the_storage_for_a_specific_thread : + concerns_for<IScopedStorage, PerThreadScopedStorage> + { + context c = () => + { + thread = the_dependency<IThread>(); + storage = new Hashtable(); + when_the(thread) + .is_told_to(x => x.provide_slot_for<Hashtable>()) + .it_will_return(storage); + }; + + because b = () => + { + result = sut.provide_storage(); + }; + + it should_return_the_storage_the_corresponds_to_the_current_thread = () => result.should_be_equal_to(storage); + + static IDictionary result; + static IThread thread; + static Hashtable storage; + } + } +}
\ No newline at end of file |
