List <ReportEvents> GenerateTotalEvents() { List <ReportEvents> report = new List <ReportEvents>(); foreach (var ivykis in _ivykiai) { ReportEvents reportEvent = new ReportEvents(); reportEvent.HumanName = _humanRepository.Retrieve(ivykis.HumanId).Name; reportEvent.Gate = _gateRepository.Retrieve().Where(x => x.Id == ivykis.GateId).FirstOrDefault().Code; reportEvent.Date = ivykis.Date; //reportEvent. } return(null); }
public void TestTryPass() { // Arrange EmployeeRepository employeeRepository = new EmployeeRepository(); Employee employee = employeeRepository.Retrieve(1); EventController eventController = new EventController(employeeRepository); GateRepository gateRepository = new GateRepository(); Gate gate = gateRepository.Retrieve(1); // Act bool hasRights = eventController.TryPass(employee.EmployeeId, gate.GateId); // Assert Assert.IsTrue(hasRights); }