public void CreateBlackDragon() { var dragonFactory = new DragonFactory(); var dragon = dragonFactory.Create(DragonFactory.DragonBreed.Black); Assert.AreEqual("Black Dragon", dragon.Name); }
public void CreateRedDragon() { var dragonFactory = new DragonFactory(); var dragon = dragonFactory.Create(DragonFactory.DragonBreed.Red); Assert.AreEqual("Red Dragon", dragon.Name); }
static void Main(string[] args) { Console.SetIn(new StreamReader("ZeroTests.txt")); var dragonFactory = new DragonFactory(); var numberOfDragons = int.Parse( Console.ReadLine()); var dragons = new DragonCollection(new TypeNameEqualityComparer(), new DragonNameComparer(), new DragonCollectionConsoleVisualizer()); for (var i = 0; i < numberOfDragons; i++) { var dragonInfo = Console.ReadLine(); var dragon = dragonFactory.Create(dragonInfo); dragons.Add(dragon); } dragons.Print(); }