public async Task TestTemporaryFileIsDeleted() { //Arrange var provider = new LocomotivaEventProvider(); //Act var tempFilePath = await provider.ReadEventPBNData(Url); provider.CleanUp(tempFilePath); //Assert Assert.IsTrue(!File.Exists(tempFilePath)); }
public async Task IntegrationTest1() { //Arrange var eventProvider = new LocomotivaEventProvider(); var urlProvider = new LocomotivaUrlProvider(); //Act var tempFilePath = await eventProvider.ReadEventPBNData(urlProvider.GetUrl(new DateTime(2015, 4, 28))); //Assert Assert.IsTrue(File.Exists(tempFilePath)); var fi = new FileInfo(tempFilePath); Assert.IsTrue(fi.Length > 0); eventProvider.CleanUp(tempFilePath); Assert.IsTrue(!File.Exists(tempFilePath)); }