1   package org.orekit.rugged.utils;
2   
3   import org.junit.jupiter.api.Test;
4   import org.orekit.rugged.adjustment.OptimizerId;
5   import org.orekit.rugged.api.BodyRotatingFrameId;
6   import org.orekit.rugged.api.EllipsoidId;
7   import org.orekit.rugged.api.InertialFrameId;
8   
9   /** Tests to obtain 100% of coverage for enum class with jacoco tool.
10   * Even though one use each enumerate of an enum class, 
11   * there is no way to obtain a full 100% coverage of the class
12   * unless ... to perform a simple test like
13   * TheEnumClass.valueOf(TheEnumClass.OneEnumValue..toString());
14   * @author Guylaine Prat
15   */
16  public class EnumeratesTest {
17  
18      @Test
19      public void testEnumOptimizerId() {
20          // Test to have 100% coverage of enum class
21          OptimizerId.valueOf(OptimizerId.LEVENBERG_MARQUADT.toString());
22      }
23      
24      @Test
25      public void testBodyRotatingFrameId() {
26          // Test to have 100% coverage of enum class
27          BodyRotatingFrameId.valueOf(BodyRotatingFrameId.ITRF.toString());
28      }
29  
30      @Test
31      public void testEllipsoidId() {
32          // Test to have 100% coverage of enum class
33          EllipsoidId.valueOf(EllipsoidId.IERS2003.toString());
34      }
35  
36      @Test
37      public void testInertialFrameId() {
38          // Test to have 100% coverage of enum class
39          InertialFrameId.valueOf(InertialFrameId.GCRF.toString());
40      }
41  }