1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.orekit.files.stk;
18
19 import static org.junit.jupiter.api.Assertions.assertEquals;
20
21 import org.junit.jupiter.api.Assertions;
22 import org.junit.jupiter.api.Test;
23 import org.orekit.errors.OrekitException;
24 import org.orekit.files.stk.STKEphemerisFile.STKCoordinateSystem;
25
26
27
28
29 public final class STKEphemerisFileTest {
30
31
32
33
34 @Test
35 public void testParseSTKCoordinateSystem() {
36 assertEquals(STKCoordinateSystem.ICRF, STKCoordinateSystem.parse("ICRF"));
37 assertEquals(STKCoordinateSystem.J2000, STKCoordinateSystem.parse("J2000"));
38 assertEquals(STKCoordinateSystem.INERTIAL, STKCoordinateSystem.parse("Inertial"));
39 assertEquals(STKCoordinateSystem.FIXED, STKCoordinateSystem.parse("Fixed"));
40 assertEquals(STKCoordinateSystem.TRUE_OF_DATE, STKCoordinateSystem.parse("TrueOfDate"));
41 assertEquals(STKCoordinateSystem.MEAN_OF_DATE, STKCoordinateSystem.parse("MeanOfDate"));
42 assertEquals(STKCoordinateSystem.TEME_OF_DATE, STKCoordinateSystem.parse("TemeOfDate"));
43 final OrekitException exception = Assertions.assertThrows(OrekitException.class, () -> STKCoordinateSystem.parse("asdf"));
44 assertEquals("STK coordinate system \"asdf\" is invalid or not yet supported", exception.getMessage());
45 }
46
47 }