public void Call_AllMethodFromRepositoryOnce() { // Arrange var addService = new AddsServices(this.repoMocked.Object, this.unitOfWork); // Act addService.GetAll(); // Assert this.repoMocked.Verify(x => x.All, Times.Once); }
public void ReturnQueryable_WithExactNumber() { // Arrange var addService = new AddsServices(this.repoMocked.Object, this.unitOfWork); // Act var expectedNumber = addService.GetAll().Count(); // Assert Assert.AreEqual(expectedNumber, this.adds.Count()); }