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); }
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); }