1   /* Copyright 2022-2025 Luc Maisonobe
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.acm;
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.ndm.adm.AdmHeader;
25  import org.orekit.files.ccsds.section.Segment;
26  
27  public class AcmWriterTest extends AbstractWriterTest<AdmHeader, Segment<AcmMetadata, AcmData>, Acm> {
28  
29      protected AcmParser getParser() {
30          return new ParserBuilder().
31                 withParsedUnitsBehavior(ParsedUnitsBehavior.STRICT_COMPLIANCE).
32                 buildAcmParser();
33      }
34  
35      protected AcmWriter getWriter() {
36          return new WriterBuilder().buildAcmWriter();
37      }
38  
39      @Test
40      public void testWriteExample01() {
41          doTest("/ccsds/adm/acm/ACMExample01.txt");
42      }
43  
44      @Test
45      public void testWriteExample02() {
46          doTest("/ccsds/adm/acm/ACMExample02.txt");
47      }
48  
49      @Test
50      public void testWriteExample03() {
51          doTest("/ccsds/adm/acm/ACMExample03.txt");
52      }
53  
54      @Test
55      public void testWriteExample04() {
56          doTest("/ccsds/adm/acm/ACMExample04.txt");
57      }
58  
59      @Test
60      public void testWriteExample05() {
61          doTest("/ccsds/adm/acm/ACMExample05.txt");
62      }
63  
64      @Test
65      public void testWriteExample06() {
66          doTest("/ccsds/adm/acm/ACMExample06.txt");
67      }
68  
69      @Test
70      public void testWriteExample07() {
71          doTest("/ccsds/adm/acm/ACMExample07.txt");
72      }
73  
74      @Test
75      public void testWriteExample08() {
76          doTest("/ccsds/adm/acm/ACMExample08.txt");
77      }
78  
79      @Test
80      public void testWriteExample09() {
81          doTest("/ccsds/adm/acm/ACMExample09.txt");
82      }
83  
84  }