Пример #1
0
        public void CountryExistsTestTrue()
        {
            //Arrange
            var countryId = -1;
            var country   = new Country();

            countryRepositoryMock.Setup(x => x.GetById(countryId))
            .Returns(country).Verifiable("should call getById of GenericRepository");

            //Act
            var isExists = countryService.CountryExists(countryId);

            //Assert
            Assert.IsTrue(isExists);
            unitOfWorkMock.Verify();
            countryRepositoryMock.Verify();
        }