示例#1
0
        public void ShouldInvokeRegisterInContainerExtension()
        {
            //Arrange
            var containerExtension = A.Fake <IBootstrapperContainerExtension>();
            var invoker            = new RegistrationInvoker <IRegisteredByConvention, RegisteredByConvention>(containerExtension);

            //Act
            invoker.Register();

            //Assert
            A.CallTo(() => containerExtension.Register <IRegisteredByConvention, RegisteredByConvention>()).MustHaveHappened();
        }
示例#2
0
        public void ShouldCreateANewRegistrationInvoker()
        {
            //Arrange
            var containerExtension = A.Fake <IBootstrapperContainerExtension>();

            //Act
            var result = new RegistrationInvoker <IRegisteredByConvention, RegisteredByConvention>(containerExtension);

            //Assert
            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(IRegistrationInvoker <IRegisteredByConvention, RegisteredByConvention>));
            Assert.IsInstanceOfType(result, typeof(RegistrationInvoker <IRegisteredByConvention, RegisteredByConvention>));
        }