public void AddNewSeriesStatus_NewStatusToBeAdded_ReturnTrue() { // Arrange var service = new BookSeriesStatusService(); var totalBeforeAdd = service.Count(); var model = new BookSeriesStatu(); // Act model.Description = "Test";; var result = service.AddNewBookSerieStatusValidation(model); var totalAfterAdded = service.Count(); bool validation; // Assert if (result == true) { if (totalBeforeAdd < totalAfterAdded) { validation = true; } else { validation = false; } } else { validation = false; } Assert.IsTrue(validation); }
public void AddeNewSeriesStatus_StatusAlreadyExist_ReturnFalse() { // Arrange var service = new BookSeriesStatusService(); var model = new BookSeriesStatu(); // Act model.Description = "In Progress"; var result = service.AddNewBookSerieStatusValidation(model); // Assert Assert.IsFalse(result); }
public void AddNewSeriesStatus_StatusIsEmpty_ReturnFalse() { // Arrange var service = new BookSeriesStatusService(); var model = new BookSeriesStatu(); // Act model.Description = ""; var result = service.AddNewBookSerieStatusValidation(model); // Assert Assert.IsFalse(result); }