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; }
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; }
public void DeleteEmployeesTest() { var accessControl = new AccessControlModule(); accessControl.DeleteEmployee("4"); }