public void Should_CallCommit() { // Arrange var addService = new AddsServices(this.repoMocked.Object, this.unitOfWorkMocked.Object); // Act addService.FindByIdAndDelete(id3); // Assert this.unitOfWorkMocked.Verify(x => x.Commit(), Times.Once); }
public void ShouldSet_IsDeleted() { // Arrange var addService = new AddsServices(this.repoMocked.Object, this.unitOfWorkMocked.Object); var foundAdd = addService.FindById(id3); // Act addService.FindByIdAndDelete(id3); // Assert Assert.AreEqual(foundAdd.IsDeleted, true); }