public void AddRegion_GivenANewRegion_AddsToDatabase() { // arrange Region region = new Region() { ID = 101 }; Mock <IRegionRepository> mockRepo = new Mock <IRegionRepository>(); LocationService sut = new LocationService(mockRepo.Object, null, null, null); // act sut.AddRegion(region); // assert mockRepo.Verify(r => r.AddRegion(It.Is <Region>(a => a.Equals(region))), Times.Once()); }