1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.orekit.files.ccsds.definitions;
18
19 import org.junit.jupiter.api.Assertions;
20 import org.junit.jupiter.api.BeforeEach;
21 import org.junit.jupiter.api.Test;
22 import org.orekit.Utils;
23 import org.orekit.data.DataContext;
24
25 public class BodyFacadeTest {
26
27 @BeforeEach
28 public void setUp() {
29 Utils.setDataRoot("regular-data");
30 }
31
32 @Test
33 public void testIssue898Earth() {
34
35
36 final BodyFacade body = BodyFacade.create(CenterName.EARTH);
37
38
39 Assertions.assertEquals("EARTH", body.getName());
40 Assertions.assertEquals("Earth", body.getBody().getName());
41
42 }
43
44 @Test
45 public void testIssue898Sun() {
46
47
48 final BodyFacade body = BodyFacade.create(CenterName.SUN);
49
50
51 Assertions.assertEquals("SUN", body.getName());
52 Assertions.assertEquals("Sun", body.getBody().getName());
53
54 }
55
56 @Test
57 public void testIssue1137() {
58
59
60 final BodyFacade sun = BodyFacade.create(CenterName.SUN, DataContext.getDefault());
61
62
63 Assertions.assertEquals("SUN", sun.getName());
64 Assertions.assertEquals("Sun", sun.getBody().getName());
65
66
67 final BodyFacade earth = BodyFacade.create(CenterName.EARTH, DataContext.getDefault().getCelestialBodies());
68
69
70 Assertions.assertEquals("EARTH", earth.getName());
71 Assertions.assertEquals("Earth", earth.getBody().getName());
72
73 }
74
75 }