コード例 #1
0
        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());
        }
コード例 #2
0
        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,
        }