public void each_type_should_be_available_from_container_by_its_type() { Container.Put(Binding.Use(AllTypes.BasedOn <IBoo>())); Container.Has <IBoo>().Should().BeFalse(); Container.Has <Boo>().Should().BeTrue(); Container.Has <AnotherBoo>().Should().BeTrue(); Container.Get <AnotherBoo>().Should().BeOfType <AnotherBoo>(); }
public void each_type_should_be_available_from_container_by_forward_type() { Container.Put(Binding.Use(AllTypes.BasedOn <IBoo>()).As <IBoo>()); Container.Has <IBoo>().Should().BeTrue(); Container.Has <Boo>().Should().BeFalse(); Container.Has <AnotherBoo>().Should().BeFalse(); Container.Get <IBoo>().Should().BeOfType <Boo>(); Container.GetAll <IBoo>().Should().HaveCount(4); Container.GetAll(typeof(IBoo)).Should().HaveCount(4); }