public void DeleteById_ShouldReturn_Success() { // Arrange fakeGroupsRepository.Setup(a => a.DeleteById(1)); groupsService = new GroupsService(fakeGroupsRepository.Object); try { // Act groupsService.DeleteGroupById(1); operationSucceeded = true; } catch (Exception ex) { errorMessage = ex.Message + " | " + ex.StackTrace; } // Assert Assert.IsTrue(operationSucceeded, errorMessage); }
public void Delete(int id) { _groups.DeleteGroupById(id); }