Example #1
0
        public void UsingAutoRegistration_WhenInvoked_ShouldReturnTheSameUnityOptions()
        {
            //Arrange
            var containerOptions = A.Fake <IBootstrapperContainerExtensionOptions>();
            var options          = new UnityOptions(containerOptions);

            //Act
            var result = options.UsingAutoRegistration();

            //Assert
            Assert.AreSame(options, result);
        }
Example #2
0
        public void UsingAutoRegistration_WhenInvoked_ShouldInvokeUsingAutoRegistrationInTheOptions()
        {
            //Arrange
            var containerOptions = A.Fake <IBootstrapperContainerExtensionOptions>();
            var options          = new UnityOptions(containerOptions);

            //Act
            options.UsingAutoRegistration();

            //Assert
            A.CallTo(() => containerOptions.UsingAutoRegistration()).MustHaveHappened();
        }