注 > Country Table 中的记录数:36 条记录。
我的代码:
[TestFixture]
public class CountriesControllerTest
{
Mock<IJN_CountryRepository> countryRepository;
Mock<IUnitOfWork> unitOfWork;
IJN_CountryService countryService;
[SetUp]
public void SetUp()
{
countryRepository = new Mock<IJN_CountryRepository>();
unitOfWork = new Mock<IUnitOfWork>();
countryService = new JN_CountryService(countryRepository.Object, unitOfWork.Object);
}
[Test]
public void ManyDelete()
{
var count = countryService.GetCount();
// Assert
Assert.AreEqual(36, count);
}
}
NUnit 测试消息:
为什么?为什么不读取记录数?