Code Coverage Tools

TestDriven.Net

http://www.testdriven.net/

NCover

https://www.ncover.com/

dotCover

https://www.jetbrains.com/dotcover/

OpenCover

https://github.com/sawilde/opencover

How To: Setup + Verify + Equals

// Arrange

projectAssignmentRepositoryMock.Setup(x => x.GetAll()).Returns(projectAssignments.AsQueryable);

// Act

projectBusiness.AssignMembers(request);

// Assert

Assert.Equal(expected, actual);

unitOfWorkMock.Verify(x => x.SaveChanges(), Times.AtLeast(1));