1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.orekit.files.ccsds.ndm.tdm;
18
19 import org.junit.jupiter.api.Test;
20 import org.orekit.files.ccsds.ndm.AbstractWriterTest;
21 import org.orekit.files.ccsds.ndm.ParsedUnitsBehavior;
22 import org.orekit.files.ccsds.ndm.ParserBuilder;
23 import org.orekit.files.ccsds.ndm.WriterBuilder;
24 import org.orekit.files.ccsds.section.Segment;
25
26 public class TdmWriterTest extends AbstractWriterTest<TdmHeader, Segment<TdmMetadata, ObservationsBlock>, Tdm> {
27
28 protected TdmParser getParser() {
29 return new ParserBuilder().
30 withParsedUnitsBehavior(ParsedUnitsBehavior.STRICT_COMPLIANCE).
31 buildTdmParser();
32 }
33
34 protected TdmWriter getWriter() {
35 return new WriterBuilder().buildTdmWriter();
36 }
37
38 @Test
39 public void testWriteKvnExample15() {
40 doTest("/ccsds/tdm/kvn/TDMExample15.txt");
41 }
42
43 @Test
44 public void testWriteKvnExample2() {
45 doTest("/ccsds/tdm/kvn/TDMExample2.txt");
46 }
47
48 @Test
49 public void testWriteKvnExample4() {
50 doTest("/ccsds/tdm/kvn/TDMExample4.txt");
51 }
52
53 @Test
54 public void testWriteKvnExample6() {
55 doTest("/ccsds/tdm/kvn/TDMExample6.txt");
56 }
57
58 @Test
59 public void testWriteKvnExample8() {
60 doTest("/ccsds/tdm/kvn/TDMExample8.txt");
61 }
62
63 @Test
64 public void testWriteKvnExampleAllKeywordsSequential() {
65 doTest("/ccsds/tdm/kvn/TDMExampleAllKeywordsSequential.txt");
66 }
67
68 @Test
69 public void testWriteKvnExampleAllKeywordsSingleDiff() {
70 doTest("/ccsds/tdm/kvn/TDMExampleAllKeywordsSingleDiff.txt");
71 }
72
73 @Test
74 public void testWriteXmlExample15() {
75 doTest("/ccsds/tdm/xml/TDMExample15.xml");
76 }
77
78 @Test
79 public void testWriteXmlExample2() {
80 doTest("/ccsds/tdm/xml/TDMExample2.xml");
81 }
82
83 @Test
84 public void testWriteXmlExample4() {
85 doTest("/ccsds/tdm/xml/TDMExample4.xml");
86 }
87
88 @Test
89 public void testWriteXmlExample6() {
90 doTest("/ccsds/tdm/xml/TDMExample6.xml");
91 }
92
93 @Test
94 public void testWriteXmlExample8() {
95 doTest("/ccsds/tdm/xml/TDMExample8.xml");
96 }
97
98 @Test
99 public void testWriteXmlExampleAllKeywordsSequential() {
100 doTest("/ccsds/tdm/xml/TDMExampleAllKeywordsSequential.xml");
101 }
102
103 @Test
104 public void testWriteXmlExampleAllKeywordsSingleDiff() {
105 doTest("/ccsds/tdm/xml/TDMExampleAllKeywordsSingleDiff.xml");
106 }
107
108 }