public void TestDeveloperCreation() { AbstractEmployee developer = EmployeeFactory.Create("Developer", 40000); String typeName = typeof(Developer).ToString(); Assert.AreEqual(typeName, developer.GetType().ToString()); }
public void TestManagerCreation() { List <AbstractEmployee> subordinates = new List <AbstractEmployee> { new Developer("Paul", 25000) }; AbstractEmployee manager = EmployeeFactory.Create("Manager", 100000, subordinates); String typeName = typeof(Manager).ToString(); Assert.AreEqual(typeName, manager.GetType().ToString()); }