예제 #1
0
        public void WithContainer_WhenInvoked_ShouldSetTheContainer()
        {
            //Arrange
            var container        = A.Fake <IContainer>();
            var containerOptions = A.Fake <IBootstrapperContainerExtensionOptions>();
            var options          = new AutofacOptions(containerOptions);

            //Act
            options.WithContainer(container);

            //Assert
            Assert.AreSame(container, options.Container);
        }
예제 #2
0
        public void WithContainer_WhenInvoked_ShouldReturnTheSameAutofacOptions()
        {
            //Arrange
            var container        = A.Fake <IContainer>();
            var containerOptions = A.Fake <IBootstrapperContainerExtensionOptions>();
            var options          = new AutofacOptions(containerOptions);

            //Act
            var result = options.WithContainer(container);

            //Assert
            Assert.AreSame(options, result);
        }