public TodosRepositoryUnitTests() { //get to-dos for tests todosList = TodosTestData.getTestTodos(); //Configure Logger Mock var _loggerMock = new Mock <ILogger <TodosRepository> >(); _logger = _loggerMock.Object; //Mock Context initialization _mockContext = new Mock <ITodosContext>(); }
public TodosContextUnitTests() { //get to-dos for tests todosList = TodosTestData.getTestTodos(); //Configure Logger Mock var _loggerMock = new Mock <ILogger <TodosContext> >(); _logger = _loggerMock.Object; //Configure Configuration Mock //var _configurationMock = new Mock<IConfiguration>(); _configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .Build(); }