Example #1
0
        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);
        }
Example #2
0
        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());
        }