예제 #1
0
 @Test(expected = OrekitException.class)
 public void ioException() throws OrekitException {
   try {
     new NetworkCrawler(url("regular-data/UTC-TAI.history"))
         .feed(Pattern.compile(".*"), new IOExceptionLoader());
   } catch (OrekitException oe) {
     // expected behavior
     Assert.assertNotNull(oe.getCause());
     Assert.assertEquals(IOException.class, oe.getCause().getClass());
     Assert.assertEquals("dummy error", oe.getMessage());
     throw oe;
   }
 }
예제 #2
0
  @Before
  public void setUp() {
    try {

      Utils.setDataRoot("regular-data");

      // Computation date
      date =
          new AbsoluteDate(
              new DateComponents(2008, 04, 07), TimeComponents.H00, TimeScalesFactory.getUTC());

      // Body mu
      mu = 3.9860047e14;

      // Reference frame = ITRF
      frameItrf = FramesFactory.getITRF(IERSConventions.IERS_2010, true);

      // Elliptic earth shape
      earthSpheric = new OneAxisEllipsoid(6378136.460, 0., frameItrf);

    } catch (OrekitException oe) {
      Assert.fail(oe.getMessage());
    }
  }