Example #1
0
        public void AllCityMocqTest()
        {
            var mock = new Mock <IDataSourceCIty>();

            mock.Setup(x => x.All()).Returns(() => new List <City>());

            IRepositoryCity cityRepository = new CityRepository(mock.Object);

            Assert.IsNotNull(cityRepository.Cities());
            mock.Verify(x => x.All());
        }