public async Task LocalStorageService_ShouldNot_ThrowException_For_InvalidSource() { var storage = new LocalStorageService("test"); var result = await storage.GetDataAsync <Customer>(); Assert.IsTrue(result.Count() == 0); }
public async Task LocalStorageService_Should_GetData_From_ValidSource() { Helper.CreateCustomers(); var storageService = new LocalStorageService(Helper.OutputPath); var result = await storageService.GetDataAsync <Customer>(); Assert.IsTrue(result.Count() > 0); }
public async Task LocalStorageService_Should_ThrowException_For_InvalidData() { Helper.CreateDummyCustomers(); var storageService = new LocalStorageService(ConfigurationManager.Settings.OutputFile); var exception = await Assert.ThrowsExceptionAsync <Exception>(async() => await storageService.GetDataAsync <Customer>()); Assert.AreEqual("Not able to retreive information.", exception.Message); }