Exemplo n.º 1
0
  static void Main(string[] args)
  {
    ConcreteRepository concrep = new ConcreteRepository();
    concrep.Workers = new List<Worker>() 
    {
    new Employee ( "Alexander", "01/01/2005" ),
    new Employee("Igor", "01/01/2010"),
    new Employee("Vasuliy", "01/01/2004"),
    new Employee("Peter", "01/01/2013"),
    new Employee("Petya", "01/01/2008"),
    new Employee("Alexey", "05/08/2011"),
    new Employee("Svyatoslav", "13/02/2001"),
    new Manager("Anton", "12/12/2010",2),
    new Manager("Olga","13/05/2010",3),
    new Manager("Svetlana", "05/05/2005",2),
    new Sales ("Oleg", "06/12/2005", 1,2) ,
    new Sales ("Irina", "05/08/2008",2,3),
    new Sales ("Olena", "01/01/2009",1,3)
    }.AsQueryable();
      
 Managing mang = new Managing(concrep);
 mang.Show();
 mang.Total_Salary_Company();
 mang.Run();
 Console.Read();
  }
Exemplo n.º 2
0
         public void TestMethod3() 
         {
             ConcreteRepository concrep = new ConcreteRepository();
             concrep.Workers = new List<Worker>() {
          new Employee ( "Alexander", "01/08/2015" ),
          new  Manager("Sergey", "01/08/2015",2),
          new Sales ("Oleg", "01/08/2015",2,3) 
            }.AsQueryable();

             Managing mang = new Managing(concrep);
             mang.Total_Salary_Company();
         }
Exemplo n.º 3
0
        public void TestMethod2(){
        mock.Setup(m => m.Workers).Returns(new List<Worker> {
          new Employee ( "Football", "01/08/2015" ),
          new  Manager("Surf board", "01/08/2015",1),
          new Sales ("Running shoes", "01/08/2015",2,3)
        }.AsQueryable());

        foreach (var p in mock.Object.Workers)
         p.Show();

        Managing mang = new Managing(mock.Object);
        mang.Total_Salary_Company();

         }