public async Task ItInjectsPropertiesWithPublicSetters() { // Arrange var host = new TestServiceHost(); var container = CreateTestContainer(); var service = new TestServiceWithComponents(TestName, host); // Act await service.Start(container); // Assert Assert.Same(service.Something, container.Resolve <SomeComponent>()); Assert.Null(service.SomethingElse); }
public async Task ItInjectsPropertiesWithPublicSetters() { // Arrange var host = new TestServiceHost(); var container = CreateTestContainer(); var service = new TestServiceWithComponents(TestName, host); // Act await service.Start(container); // Assert Assert.Same(service.Something, container.Resolve<SomeComponent>()); Assert.Null(service.SomethingElse); }