public void ErrorLog_Addlog_InvalidModelState() { // Arrange var service = new ErrorLogsController(_errorLogRepository); service.ModelState.AddModelError("key", "error message"); // Act var result = service.AddLog(_data) as OkNegotiatedContentResult <LogDetails>; }
public void ErrorLog_Addlog_Invalid() { // Arrange var service = new ErrorLogsController(_errorLogRepository); ((ErrorLogRepositoryMock)_errorLogRepository).AddShouldFail = true; // Act var result = service.AddLog(_data) as OkNegotiatedContentResult <LogDetails>; }
public void ErrorLog_AddLogs() { // Arrange var service = new ErrorLogsController(_errorLogRepository); // Act var result = service.AddLog(_data) as OkNegotiatedContentResult <LogDetails>;; // Assert Assert.AreEqual(_data.EIN, result.Content.EIN); }