public void GetEmployee_RequestNotExistingEmployeeId_ThrowsException() { // arrange Mock<IRepository> mockedRepository = CreateMockedRepository(); var service = new EmployeeService(mockedRepository.Object); // act service.GetEmployee(0); }
public void GetEmployee_RequestExistingEmployeeId_ReturnsMatchingEmployees() { // arrange Mock<IRepository> mockedRepository = CreateMockedRepository(); var service = new EmployeeService(mockedRepository.Object); // act EmployeeInfo employee = service.GetEmployee(1); // assert Assert.AreEqual("Roger", employee.FirstName); }