public static IList <string> GetMisFileText(Mission mission) { if (mission is null) { throw new ArgumentNullException(nameof(mission)); } var multipleRecords = MissionSerializer.GetMultipleRecords(mission); var writer = new RecordWriter(multipleRecords); return(writer.GetTextLines()); }
public void RecordWriter_Works() { // Arrange, var path = Path.Combine(TestContext.DeploymentDirectory, "5G1A.mis"); var outputPath = Path.Combine(TestContext.DeploymentDirectory, "original.mis"); var input = MisFileSerializer.GetMultipleRecords(path); var target = new RecordWriter(input); // Act, var lines = target.GetTextLines(); File.WriteAllLines(outputPath, lines); // Assert, }