main
1using System;
2using developwithpassion.bdd.contexts;
3using developwithpassion.bdd.harnesses.mbunit;
4using developwithpassion.bdddoc.core;
5using gorilla.migrations.console.infrastructure;
6
7namespace tests.console.infrastructure
8{
9 public class FactorySpecs
10 {
11 public abstract class concern : observations_for_a_sut_with_a_contract<Scope, Factory> {}
12
13 [Concern(typeof (Factory))]
14 public class when_building_a_component_using_a_factory_scope : concern
15 {
16 it should_return_a_new_instance_each_time = () =>
17 {
18 Func<object> factory = () => new object();
19 var first = controller.sut.apply_to(factory);
20 var second = controller.sut.apply_to(factory);
21 ReferenceEquals(first, second).should_be_false();
22 };
23 }
24 }
25}