public void LoadTransactions_with_NullSheetApiResponses_returns_EmptyTrnsactionLists() { var sheetApiMock = SheetApiMocker.GetMock(); sheetApiMock.Setup(x => x.LoadRange(It.IsAny <string>(), It.IsAny <string>())) .Returns((IList <IList <Object> >)null); var repo = GetMonthRepo(sheetApi: sheetApiMock.Object); var result = repo.LoadTransactions(); Assert.NotNull(result); Assert.NotNull(result.Expenses); Assert.NotNull(result.Income); Assert.Empty(result.Expenses); Assert.Empty(result.Income); }
private static IMonthSheetRepository GetMonthRepo(IOptions <MonthSheetDetails> sheetDetails = null, ISheetApiService sheetApi = null) { return(new MonthSheetRepository(sheetDetails ?? MonthSheetDetailMocker.GetPassing(), sheetApi ?? SheetApiMocker.GetService())); }