public void WillNotAddMultipleTypes() { Compose <IAnimal> .Exports.Clear(); //Register Compose <IAnimal> .Add(typeof(Lion)); Compose <IAnimal> .Add(typeof(Lion)); //Act var animals = Compose <IAnimal> .GetAll(); // Assert Assert.True(animals.Count == 1 && animals.First().GetType() == typeof(Lion)); }
public void CanGetAllExports() { Compose <IAnimal> .Exports.Clear(); //Register Compose <IAnimal> .Add(typeof(Lion)); Compose <IAnimal> .Add(typeof(Dog)); Compose <IAnimal> .Add(typeof(Cat)); //Act var animals = Compose <IAnimal> .GetAll(); // Assert Assert.True(animals.Count == 3); }