public void GetEmployee_SadPath() { // Arrange var controller = new EmployeeController(_employeeServiceMock.Object, _mapEmployee); // Act Action act = () => controller.GetEmployee(2); // Assert Assert.Throws<InvalidOperationException>(new TestDelegate(act)); }
public void GetEmployee_HappyPath() { // Arrange var controller = new EmployeeController(_employeeServiceMock.Object, _mapEmployee); // Act var viewModel = controller.GetEmployee(1); // Assert Assert.NotNull(viewModel); }