1   /* Copyright 2002-2022 CS GROUP
2    * Licensed to CS GROUP (CS) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * CS licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *   http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.orekit.files.ccsds.ndm.adm.aem;
18  
19  import org.junit.Ignore;
20  import org.junit.Test;
21  import org.orekit.files.ccsds.ndm.AbstractWriterTest;
22  import org.orekit.files.ccsds.ndm.ParsedUnitsBehavior;
23  import org.orekit.files.ccsds.ndm.ParserBuilder;
24  import org.orekit.files.ccsds.ndm.WriterBuilder;
25  import org.orekit.files.ccsds.section.Header;
26  
27  public class AemWriterTest extends AbstractWriterTest<Header, AemSegment, Aem> {
28  
29      protected AemParser getParser() {
30          return new ParserBuilder().
31                 withParsedUnitsBehavior(ParsedUnitsBehavior.STRICT_COMPLIANCE).
32                 buildAemParser();
33      }
34  
35      protected AemWriter getWriter() {
36          return new WriterBuilder().buildAemWriter();
37      }
38  
39      @Test
40      public void testWriteExample01() {
41          doTest("/ccsds/adm/aem/AEMExample01.txt");
42      }
43  
44      @Test
45      public void testWriteExample02() {
46          doTest("/ccsds/adm/aem/AEMExample02.txt");
47      }
48  
49      @Test
50      public void testWriteKvnExample03() {
51          doTest("/ccsds/adm/aem/AEMExample03.txt");
52      }
53  
54      @Test
55      public void testWriteXmlExample03() {
56          doTest("/ccsds/adm/aem/AEMExample03.xml");
57      }
58  
59      @Test
60      public void testWriteExample04() {
61          doTest("/ccsds/adm/aem/AEMExample04.txt");
62      }
63  
64      @Test
65      public void testWriteExample05() {
66          doTest("/ccsds/adm/aem/AEMExample05.txt");
67      }
68  
69      // temporarily ignored as Orekit does not yet support SPIN_NUTATION attitude type
70      @Ignore
71      @Test
72      public void testWriteExample06() {
73          doTest("/ccsds/adm/aem/AEMExample06.txt");
74      }
75  
76      @Test
77      public void testWriteExample07() {
78          doTest("/ccsds/adm/aem/AEMExample07.txt");
79      }
80  
81      @Test
82      public void testWriteExample08() {
83          doTest("/ccsds/adm/aem/AEMExample08.txt");
84      }
85  
86      @Test
87      public void testWriteExample09() {
88          doTest("/ccsds/adm/aem/AEMExample09.txt");
89      }
90  
91      @Test
92      public void testWriteExample10() {
93          doTest("/ccsds/adm/aem/AEMExample10.txt");
94      }
95  
96      @Test
97      public void testWriteExample11() {
98          doTest("/ccsds/adm/aem/AEMExample11.xml");
99      }
100 
101     @Test
102     public void testWriteExample12() {
103         doTest("/ccsds/adm/aem/AEMExample12.txt");
104     }
105 
106     @Test
107     public void testWriteExample13() {
108         doTest("/ccsds/adm/aem/AEMExample13.xml");
109     }
110 
111 }