public async Task CanCreateReleaseFile_FailOnFolderNotExisting() { var dummyReleaseFileEntries = CreateReleaseFiles(); var fileLocation = Randomizer.GetString(); if (Directory.Exists(fileLocation)) { Directory.Delete(fileLocation, true); } Assert.False(await ReleaseFile.CreateReleaseFile(dummyReleaseFileEntries, fileLocation), "Creating RELEASE file passed even when we had no folder to work with"); }
public async Task CanCreateReleaseFile() { var dummyReleaseFileEntries = CreateReleaseFiles(); Assert.True( await ReleaseFile.CreateReleaseFile(dummyReleaseFileEntries, TestContext.CurrentContext.WorkDirectory), "Wasn't able to create the release file"); Assert.True( dummyReleaseFileEntries.SequenceEqual( ReleaseFile.ReadReleaseFile(File.ReadLines(ReleaseFileLocation))), "What we made and what we read from disk isn't the same"); }