Esempio n. 1
0
            public void Must_return_new_instance_of_DefaultMapper_for_the_requested_types()
            {
                var systemUnderTest       = new DefaultMapperLocator();
                IMapper <Foo, Bar> mapper = systemUnderTest.Locate <Foo, Bar>();

                Assert.That(mapper, Is.InstanceOf <DefaultMapper <Foo, Bar> >());
            }
Esempio n. 2
0
            public void Must_return_same_instance_on_second_request()
            {
                var systemUnderTest           = new DefaultMapperLocator();
                IMapper <FooBar, Bar> mapper  = systemUnderTest.Locate <FooBar, Bar>();
                IMapper <FooBar, Bar> mapper2 = systemUnderTest.Locate <FooBar, Bar>();

                Assert.That(mapper, Is.InstanceOf <DefaultMapper <FooBar, Bar> >());
                Assert.That(mapper2, Is.SameAs(mapper));
            }