public void MapPublicProperty() { var builder = new InjectionBuilder <InjectMe>() .Map(e => e.PublicProperty) .Build(); var item = new InjectMe(); builder.Inject(item, "test"); item.PublicProperty.Should().Be("test"); }
public void ShouldInject() { var injector = new InjectionBuilder <InjectMe>() .MapAttributed() .Build(); var injectMe = new InjectMe(); injector.Inject(injectMe, new OneImplementor(), new TwoImplementor(), new ThreeImplementor()); injectMe.One.Should().NotBeNull(); injectMe.Two.Should().NotBeNull(); injectMe.Three.Should().NotBeNull(); }