예제 #1
0
        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);
        }
예제 #2
0
 public void Delete(int id)
 {
     _groups.DeleteGroupById(id);
 }