示例#1
0
        public void GetAndDeleteEmployeesTest()
        {
            var       accessControl = new AccessControlModule();
            Stopwatch sWatch        = new Stopwatch();

            sWatch.Start();
            var answer = accessControl.GetEmployees();

            sWatch.Stop();
            TimeSpan tSpan = sWatch.Elapsed;

            sWatch = new Stopwatch();
            var reader = new StreamReader(answer);
            var data   = reader.ReadToEnd();
            var res    = JsonConvert.DeserializeObject <List <Employee> >(data);

            sWatch.Start();
            foreach (var employee in res)
            {
                accessControl.DeleteEmployee(employee.Id.ToString());
            }
            sWatch.Stop();
            tSpan = sWatch.Elapsed;
        }
示例#2
0
 public void GetAndDeleteEmployeesTest()
 {
     var accessControl = new AccessControlModule();
     Stopwatch sWatch = new Stopwatch();
     sWatch.Start();
     var answer = accessControl.GetEmployees();
     sWatch.Stop();
     TimeSpan tSpan = sWatch.Elapsed;
     sWatch = new Stopwatch();
     var reader = new StreamReader(answer);
     var data = reader.ReadToEnd();
     var res = JsonConvert.DeserializeObject<List<Employee>>(data);
     sWatch.Start();
     foreach (var employee in res)
     {
         accessControl.DeleteEmployee(employee.Id.ToString());
     }
     sWatch.Stop();
     tSpan = sWatch.Elapsed;
 }
示例#3
0
 public void DeleteEmployeesTest()
 {
     var accessControl = new AccessControlModule();
     accessControl.DeleteEmployee("4");
 }
示例#4
0
        public void DeleteEmployeesTest()
        {
            var accessControl = new AccessControlModule();

            accessControl.DeleteEmployee("4");
        }