Example #1
0
        public void GetEmployeeByID()
        {
            ProxyImplementation service  = new ProxyImplementation();
            ProxyEmployee       employee = service.GetEmployeeByID(1);

            Xunit.Assert.NotNull(employee);
            Xunit.Assert.True(employee.Id == 1);
        }
Example #2
0
        public void DeleteteEmployee()
        {
            ProxyImplementation service = new ProxyImplementation();

            service.DeleteEmployee(1053);
            List <ProxyEmployee> proxylist = service.GetEmployees();

            Xunit.Assert.False(proxylist.Exists(x => x.Id == 1053));
        }
Example #3
0
        public void GetEmployees()
        {
            ProxyImplementation service = new ProxyImplementation();

            List <ProxyEmployee> proxylist = service.GetEmployees();

            Xunit.Assert.NotNull(proxylist);
            Xunit.Assert.True(proxylist.Count > 0);
        }
Example #4
0
        public void UpdateEmployee()
        {
            ProxyImplementation service  = new ProxyImplementation();
            ProxyEmployee       employee = new ProxyEmployee()
            {
                Id       = 1054,
                Name     = "Dimitris Kosmas",
                Salary   = 130000,
                Birthday = new DateTime(1998, 04, 30, 13, 14, 19),
                Job      = ".net developer"
            };

            service.UpdateEmployee(1054, employee);
            List <ProxyEmployee> proxylist = service.GetEmployees();

            Xunit.Assert.True(proxylist.Exists(x => x.Id == 1054 && x.Name == "Dimitris Kosmas" && x.Salary == 130000 && x.Id == 1054));
        }
Example #5
0
        public void CreateEmployee()
        {
            ProxyImplementation service = new ProxyImplementation();

            ProxyEmployee employee = new ProxyEmployee()
            {
                Id       = 1041,
                Name     = "Dimitris K. Kosmas",
                Salary   = 25000,
                Birthday = new DateTime(1998, 04, 30, 13, 14, 19),
                Job      = "ProxyEmployee"
            };

            service.CreateEmployee(employee);
            List <ProxyEmployee> proxylist = service.GetEmployees();

            Xunit.Assert.True(proxylist.Exists(x => x.Name == "Dimitris K. Kosmas" && x.Salary == 25000));
        }
Example #6
0
    public void Execute()
    {
        ProxyImplementation impl = new ProxyImplementation();

        impl.DoSomething();
    }