Exemplo n.º 1
0
        public void TestDeveloperCreation()
        {
            AbstractEmployee developer = EmployeeFactory.Create("Developer", 40000);

            String typeName = typeof(Developer).ToString();

            Assert.AreEqual(typeName, developer.GetType().ToString());
        }
Exemplo n.º 2
0
        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());
        }