예제 #1
0
        public void Bootstrapper_End()
        {
            var sut = new TestBootstrapper();

            sut.SetContainer(mockContainerProvider.Object);

            sut.End();
        }
예제 #2
0
        public void Bootstrapper_Start_RunsRegistrations()
        {
            var sut = new TestBootstrapper();

            sut.SetContainer(mockContainerProvider.Object);

            sut.Start();

            mockContainerProvider.Verify();
        }
예제 #3
0
        public void Bootstrapper_Dispose_DisposesContainerProvider()
        {
            TestBootstrapper sut;

            using (sut = new TestBootstrapper())
            {
                sut.SetContainer(new TestContainerProvider());

                Assert.IsTrue(!GetDisposedValue(sut.Container));
            }

            try
            {
                Assert.IsTrue(GetDisposedValue(sut.Container));
            }
            catch (Exception ex)
            {
                Assert.IsTrue(ex is ObjectDisposedException);
            }
        }