public void CreateCondensedFileInputFilesOnly(params string[] paths) { var manager = new FileCondenserManager(); foreach (var path in paths) { manager.AddFile(path); } manager.OutputFileName = manager.OutputFileName + string.Join("_", from f in paths select new FileInfo(f).Name); Assert.DoesNotThrow(() => { manager.CreateFile(); }); }
public bool CondensedFileSmallerThanOriginal(string path) { var w = File.ReadAllText(path); var length = w.Length; var manager = new FileCondenserManager(); manager.AddFile(path); manager.OutputFileName = nameof(CondensedFileSmallerThanOriginal) + path; Assert.DoesNotThrow(() => { manager.CreateFile(); }); var fc = File.ReadAllText(manager.OutputFileName); int?fcLength = fc.Length; Assert.IsTrue(fcLength.HasValue); TestContext.WriteLine($"Created File Size: {fcLength}\tOriginal File Size: {length}"); return(fcLength < length); }