Commit 3b375146 authored by Bryan Cazabonne's avatar Bryan Cazabonne

Updated JUnit version to 4.13.1.

Fixes #743
parent dbb408b2
Pipeline #813 passed with stage
in 26 minutes
......@@ -27,7 +27,7 @@
<property name="hipparchus.filtering.jar" value="hipparchus-filtering-${hipparchus.version}.jar" />
<property name="hipparchus.stat.jar" value="hipparchus-stat-${hipparchus.version}.jar" />
<property name="hipparchus.maven.path" value="org/hipparchus" />
<property name="junit.version" value="4.12" />
<property name="junit.version" value="4.13.1" />
<property name="junit.jar" value="junit-${junit.version}.jar" />
<property name="junit.maven.path" value="junit/junit" />
<property name="mockito.version" value="3.3.3" />
......
......@@ -51,7 +51,7 @@
<orekit.mathjax.config>&lt;script type=&quot;text/x-mathjax-config&quot;&gt;MathJax.Hub.Config({ TeX: { extensions: [&quot;autoload.js&quot;]}});&lt;/script&gt;</orekit.mathjax.config>
<orekit.mathjax.enable>&lt;script type=&quot;text/javascript&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_CHTML&quot;&gt;&lt;/script&gt;</orekit.mathjax.enable>
<orekit.hipparchus.version>1.8</orekit.hipparchus.version>
<orekit.junit.version>4.12</orekit.junit.version>
<orekit.junit.version>4.13.1</orekit.junit.version>
<orekit.compiler.source>1.8</orekit.compiler.source>
<orekit.compiler.target>1.8</orekit.compiler.target>
<orekit.implementation.build>${git.revision}; ${maven.build.timestamp}</orekit.implementation.build>
......
......@@ -16,6 +16,7 @@
*/
package org.orekit.data;
import org.hamcrest.MatcherAssert;
import org.junit.Assert;
import org.junit.Test;
import org.orekit.OrekitMatchers;
......@@ -108,7 +109,7 @@ public class ExceptionalDataContextTest {
Propagator propagator = new KeplerianPropagator(orbit, attitude);
SpacecraftState state = propagator.propagate(date.shiftedBy(86400));
TimeStampedPVCoordinates pv = state.getPVCoordinates(ecef);
Assert.assertThat(
MatcherAssert.assertThat(
pv.getPosition().getNorm(),
OrekitMatchers.relativelyCloseTo(a, 10));
......
......@@ -26,6 +26,7 @@ import java.nio.charset.StandardCharsets;
import java.util.regex.Pattern;
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;
import org.junit.Assert;
import org.junit.Test;
......@@ -65,7 +66,7 @@ public class ZipJarCrawlerTest {
}
public void loadData(InputStream input, String name) {
++count;
Assert.assertThat(name, CoreMatchers.containsString("!/"));
MatcherAssert.assertThat(name, CoreMatchers.containsString("!/"));
}
public int getCount() {
return count;
......
......@@ -21,6 +21,7 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;
import org.hipparchus.exception.DummyLocalizable;
import org.junit.Assert;
import org.junit.Test;
......@@ -64,9 +65,9 @@ public class OrekitExceptionTest {
// verify
String actual = writer.toString();
Assert.assertThat(actual,
MatcherAssert.assertThat(actual,
CoreMatchers.containsString(message.getSourceString()));
Assert.assertThat(actual,
MatcherAssert.assertThat(actual,
CoreMatchers.containsString("IllegalStateException: bad message"));
}
......
......@@ -26,6 +26,7 @@ import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import org.hamcrest.MatcherAssert;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.linear.Array2DRowRealMatrix;
......@@ -246,7 +247,7 @@ public class OEMParserTest {
CelestialBody mars = CelestialBodyFactory.getMars();
TimeStampedPVCoordinates marsPV = mars.getPVCoordinates(actualStart, eme2000);
TimeStampedPVCoordinates marsPV_in_marscentered_frame = mars.getPVCoordinates(actualStart, actualFrame);
Assert.assertThat(
MatcherAssert.assertThat(
marsPV_in_marscentered_frame,
OrekitMatchers.pvCloseTo(PVCoordinates.ZERO, 1e-3));
Assert.assertEquals(actualTransform.getTranslation(), marsPV.getPosition().negate());
......@@ -283,10 +284,10 @@ public class OEMParserTest {
final int ulps = 12;
for (TimeStampedPVCoordinates coord : dataLines) {
Assert.assertThat(
MatcherAssert.assertThat(
propagator.getPVCoordinates(coord.getDate(), actualFrame),
OrekitMatchers.pvCloseTo(coord, ulps));
Assert.assertThat(
MatcherAssert.assertThat(
propagator.propagate(coord.getDate()).getPVCoordinates(),
OrekitMatchers.pvCloseTo(coord, ulps));
}
......
......@@ -21,6 +21,7 @@ import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.HashMap;
import org.hamcrest.MatcherAssert;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.linear.Array2DRowRealMatrix;
import org.hipparchus.util.FastMath;
......@@ -522,7 +523,7 @@ public class OPMParserTest {
.withConventions(IERSConventions.IERS_2010);
final OPMFile file = parser.parse(inEntry);
final Frame actualFrame = file.getMetaData().getFrame();
Assert.assertThat(
MatcherAssert.assertThat(
moon.getPVCoordinates(date, actualFrame),
OrekitMatchers.pvCloseTo(PVCoordinates.ZERO, 1e-3));
}
......
......@@ -17,7 +17,6 @@
package org.orekit.files.ccsds;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import java.io.BufferedReader;
import java.io.IOException;
......@@ -30,6 +29,7 @@ import java.util.List;
import java.util.Map;
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.Decimal64;
......@@ -87,49 +87,49 @@ public class StreamingOemWriterTest {
if (!ccsdsFrame.isLof()) {
Frame frame = ccsdsFrame.getFrame(IERSConventions.IERS_2010, true);
String actual = StreamingOemWriter.guessFrame(frame);
assertThat(actual, CoreMatchers.is(ccsdsFrame.name()));
MatcherAssert.assertThat(actual, CoreMatchers.is(ccsdsFrame.name()));
}
}
// check common Orekit frames from FramesFactory
assertThat(StreamingOemWriter.guessFrame(FramesFactory.getGCRF()),
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(FramesFactory.getGCRF()),
CoreMatchers.is("GCRF"));
assertThat(StreamingOemWriter.guessFrame(FramesFactory.getEME2000()),
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(FramesFactory.getEME2000()),
CoreMatchers.is("EME2000"));
assertThat(
MatcherAssert.assertThat(
StreamingOemWriter.guessFrame(
FramesFactory.getITRFEquinox(IERSConventions.IERS_2010, true)),
CoreMatchers.is("GRC"));
assertThat(StreamingOemWriter.guessFrame(FramesFactory.getICRF()),
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(FramesFactory.getICRF()),
CoreMatchers.is("ICRF"));
assertThat(
MatcherAssert.assertThat(
StreamingOemWriter.guessFrame(
FramesFactory.getITRF(IERSConventions.IERS_2010, true)),
CoreMatchers.is("ITRF2014"));
assertThat(StreamingOemWriter.guessFrame(FramesFactory.getGTOD(true)),
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(FramesFactory.getGTOD(true)),
CoreMatchers.is("TDR"));
assertThat(StreamingOemWriter.guessFrame(FramesFactory.getTEME()),
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(FramesFactory.getTEME()),
CoreMatchers.is("TEME"));
assertThat(StreamingOemWriter.guessFrame(FramesFactory.getTOD(true)),
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(FramesFactory.getTOD(true)),
CoreMatchers.is("TOD"));
// check that guessed name loses the IERS conventions and simpleEOP flag
for (ITRFVersion version : ITRFVersion.values()) {
final String name = version.getName().replaceAll("-", "");
for (final IERSConventions conventions : IERSConventions.values()) {
assertThat(StreamingOemWriter.guessFrame(FramesFactory.getITRF(version, conventions, true)),
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(FramesFactory.getITRF(version, conventions, true)),
CoreMatchers.is(name));
assertThat(StreamingOemWriter.guessFrame(FramesFactory.getITRF(version, conventions, false)),
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(FramesFactory.getITRF(version, conventions, false)),
CoreMatchers.is(name));
}
}
// check other names in Annex A
assertThat(
MatcherAssert.assertThat(
StreamingOemWriter.guessFrame(
CelestialBodyFactory.getMars().getInertiallyOrientedFrame()),
CoreMatchers.is("MCI"));
assertThat(
MatcherAssert.assertThat(
StreamingOemWriter.guessFrame(
CelestialBodyFactory.getSolarSystemBarycenter()
.getInertiallyOrientedFrame()),
......@@ -138,7 +138,7 @@ public class StreamingOemWriterTest {
CcsdsModifiedFrame frame = new CcsdsModifiedFrame(
FramesFactory.getEME2000(), "EME2000",
CelestialBodyFactory.getMars(), "MARS");
assertThat(StreamingOemWriter.guessFrame(frame), CoreMatchers.is("EME2000"));
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(frame), CoreMatchers.is("EME2000"));
Vector3D v = frame.getTransformProvider().getTransform(AbsoluteDate.J2000_EPOCH).getTranslation();
FieldVector3D<Decimal64> v64 = frame.getTransformProvider().getTransform(FieldAbsoluteDate.getJ2000Epoch(Decimal64Field.getInstance())).getTranslation();
Assert.assertEquals(0.0, FieldVector3D.distance(v64, v).getReal(), 1.0e-10);
......@@ -149,12 +149,12 @@ public class StreamingOemWriterTest {
FramesFactory.getITRF(IERSConventions.IERS_2010, true)),
new GeodeticPoint(1.2, 2.3, 45.6),
"dummy");
assertThat(StreamingOemWriter.guessFrame(topo), CoreMatchers.is("dummy"));
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(topo), CoreMatchers.is("dummy"));
// check a fake ICRF
Frame fakeICRF = new Frame(FramesFactory.getGCRF(), Transform.IDENTITY,
CelestialBodyFactory.SOLAR_SYSTEM_BARYCENTER + "/inertial");
assertThat(StreamingOemWriter.guessFrame(fakeICRF), CoreMatchers.is("ICRF"));
MatcherAssert.assertThat(StreamingOemWriter.guessFrame(fakeICRF), CoreMatchers.is("ICRF"));
}
/**
......@@ -170,22 +170,22 @@ public class StreamingOemWriterTest {
for (CenterName centerName : centerNames) {
CelestialBody body = centerName.getCelestialBody();
String name = centerName.name().replace('_', ' ');
assertThat(StreamingOemWriter.guessCenter(body.getInertiallyOrientedFrame()),
MatcherAssert.assertThat(StreamingOemWriter.guessCenter(body.getInertiallyOrientedFrame()),
CoreMatchers.is(name));
assertThat(StreamingOemWriter.guessCenter(body.getBodyOrientedFrame()),
MatcherAssert.assertThat(StreamingOemWriter.guessCenter(body.getBodyOrientedFrame()),
CoreMatchers.is(name));
}
// Earth-Moon Barycenter is special
CelestialBody emb = CenterName.EARTH_MOON.getCelestialBody();
assertThat(StreamingOemWriter.guessCenter(emb.getInertiallyOrientedFrame()),
MatcherAssert.assertThat(StreamingOemWriter.guessCenter(emb.getInertiallyOrientedFrame()),
CoreMatchers.is("EARTH-MOON BARYCENTER"));
assertThat(StreamingOemWriter.guessCenter(emb.getBodyOrientedFrame()),
MatcherAssert.assertThat(StreamingOemWriter.guessCenter(emb.getBodyOrientedFrame()),
CoreMatchers.is("EARTH-MOON BARYCENTER"));
// check some special CCSDS frames
CcsdsModifiedFrame frame = new CcsdsModifiedFrame(
FramesFactory.getEME2000(), "EME2000",
CelestialBodyFactory.getMars(), "MARS");
assertThat(StreamingOemWriter.guessCenter(frame), CoreMatchers.is("MARS"));
MatcherAssert.assertThat(StreamingOemWriter.guessCenter(frame), CoreMatchers.is("MARS"));
// check unknown frame
Frame topo = new TopocentricFrame(new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
......@@ -193,7 +193,7 @@ public class StreamingOemWriterTest {
FramesFactory.getITRF(IERSConventions.IERS_2010, true)),
new GeodeticPoint(1.2, 2.3, 45.6),
"dummy");
assertThat(StreamingOemWriter.guessCenter(topo), CoreMatchers.is("UNKNOWN"));
MatcherAssert.assertThat(StreamingOemWriter.guessCenter(topo), CoreMatchers.is("UNKNOWN"));
}
......
......@@ -24,6 +24,7 @@ import java.util.ArrayList;
import java.util.List;
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
......@@ -68,7 +69,7 @@ public class TDMParserTest {
} catch (OrekitException e) {
// Malformed URL exception indicates external resource was disabled
// file not found exception indicates parser tried to load the resource
Assert.assertThat(e.getCause(),
MatcherAssert.assertThat(e.getCause(),
CoreMatchers.instanceOf(MalformedURLException.class));
}
}
......
......@@ -22,6 +22,7 @@ import java.util.Arrays;
import java.util.List;
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.junit.Assert;
import org.junit.Before;
......@@ -131,35 +132,35 @@ public class EphemerisSegmentPropagatorTest {
BoundedPropagator propagator = ephemeris.getPropagator();
//verify
Assert.assertThat(propagator.getMinDate(), CoreMatchers.is(start));
Assert.assertThat(propagator.getMaxDate(), CoreMatchers.is(end));
Assert.assertThat(propagator.getFrame(), CoreMatchers.is(frame));
MatcherAssert.assertThat(propagator.getMinDate(), CoreMatchers.is(start));
MatcherAssert.assertThat(propagator.getMaxDate(), CoreMatchers.is(end));
MatcherAssert.assertThat(propagator.getFrame(), CoreMatchers.is(frame));
int ulps = 0;
PVCoordinates expected = new PVCoordinates(
new Vector3D(6778137, 0, 0),
new Vector3D(1.0 / 30, 0, 0));
Assert.assertThat(
MatcherAssert.assertThat(
propagator.propagate(start).getPVCoordinates(),
OrekitMatchers.pvCloseTo(expected, ulps));
Assert.assertThat(
MatcherAssert.assertThat(
propagator.getPVCoordinates(start, frame),
OrekitMatchers.pvCloseTo(expected, ulps));
expected = new PVCoordinates(
new Vector3D(6778137 + 2, 0, 0),
new Vector3D(2 / 30.0, 0, 0));
Assert.assertThat(
MatcherAssert.assertThat(
propagator.propagate(start.shiftedBy(45)).getPVCoordinates(),
OrekitMatchers.pvCloseTo(expected, ulps));
Assert.assertThat(
MatcherAssert.assertThat(
propagator.getPVCoordinates(start.shiftedBy(45), frame),
OrekitMatchers.pvCloseTo(expected, ulps));
expected = new PVCoordinates(
new Vector3D(6778137 + 3, 0, 0),
new Vector3D(2 / 30.0, 0, 0));
Assert.assertThat(
MatcherAssert.assertThat(
propagator.propagate(end).getPVCoordinates(),
OrekitMatchers.pvCloseTo(expected, ulps));
Assert.assertThat(
MatcherAssert.assertThat(
propagator.getPVCoordinates(end, frame),
OrekitMatchers.pvCloseTo(expected, ulps));
// check reset state is prohibited
......
......@@ -19,6 +19,7 @@ package org.orekit.forces;
import java.util.List;
import org.hamcrest.MatcherAssert;
import org.hipparchus.Field;
import org.hipparchus.RealFieldElement;
import org.hipparchus.analysis.differentiation.DSFactory;
......@@ -397,7 +398,7 @@ public class BoxAndSolarArraySpacecraftTest {
Vector3D newHeadOnDrag = cube.dragAcceleration(date, frame, position, rotation, mass, density, headOnVelocity,
getDragParameters(cube));
Vector3D oldHeadOnDrag = oldDragAcceleration(cube, date, frame, position, rotation, mass, density, headOnVelocity);
Assert.assertThat(newHeadOnDrag, OrekitMatchers.vectorCloseTo(oldHeadOnDrag.scalarMultiply(2), 1));
MatcherAssert.assertThat(newHeadOnDrag, OrekitMatchers.vectorCloseTo(oldHeadOnDrag.scalarMultiply(2), 1));
// on an angle, the no lift implementation applies drag to the velocity direction
// instead of to the facet normal direction. In the symmetrical case, this implies
......@@ -411,7 +412,7 @@ public class BoxAndSolarArraySpacecraftTest {
Vector3D oldDiagDrag = oldDragAcceleration(cube, date, frame, position, rotation, mass, density, diagonalVelocity);
double oldMissingCoeff = 2.0 / FastMath.sqrt(3.0);
Vector3D fixedOldDrag = new Vector3D(oldMissingCoeff, oldDiagDrag);
Assert.assertThat(newDiagDrag, OrekitMatchers.vectorCloseTo(fixedOldDrag, 1));
MatcherAssert.assertThat(newDiagDrag, OrekitMatchers.vectorCloseTo(fixedOldDrag, 1));
}
......
......@@ -17,6 +17,7 @@
package org.orekit.forces.maneuvers;
import org.hamcrest.MatcherAssert;
import org.hipparchus.Field;
import org.hipparchus.analysis.differentiation.DSFactory;
import org.hipparchus.analysis.differentiation.DerivativeStructure;
......@@ -690,9 +691,9 @@ public class ConstantThrustManeuverTest extends AbstractLegacyForceModelTest {
propagator2.setAttitudeProvider(lofLaw);
propagator2.addForceModel(maneuverWithOverride);
final SpacecraftState finalState2 = propagator2.propagate(finalState1.getDate());
Assert.assertThat(finalState2.getPVCoordinates(),
OrekitMatchers.pvCloseTo(finalState1.getPVCoordinates(),
1.0e-10));
MatcherAssert.assertThat(finalState2.getPVCoordinates(),
OrekitMatchers.pvCloseTo(finalState1.getPVCoordinates(),
1.0e-10));
Assert.assertFalse(maneuverWithoutOverride.isFiring(fireDate.shiftedBy(-1.0e-6)));
Assert.assertTrue(maneuverWithoutOverride.isFiring(fireDate.shiftedBy(+1.0e-6)));
Assert.assertTrue(maneuverWithoutOverride.isFiring(fireDate.shiftedBy(0.5 * duration)));
......
......@@ -22,6 +22,7 @@ import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import org.hamcrest.MatcherAssert;
import org.hamcrest.core.IsInstanceOf;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.junit.Assert;
......@@ -122,7 +123,7 @@ public class EclipticProviderTest {
Frame frame = FramesFactory.getEcliptic(IERSConventions.IERS_2003);
//action + verify
Assert.assertThat(frame.getParent().getTransformProvider(),
MatcherAssert.assertThat(frame.getParent().getTransformProvider(),
IsInstanceOf.instanceOf(MODProvider.class));
}
......
......@@ -17,6 +17,7 @@
package org.orekit.frames;
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;
import org.junit.Assert;
import org.junit.Test;
import org.orekit.Utils;
......@@ -39,73 +40,73 @@ public class ITRFVersionLoaderTest {
new ITRFVersionLoader(ITRFVersionLoader.SUPPORTED_NAMES);
// action + verify
Assert.assertThat(loader.getConfiguration("eopc04_05.00", 0).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("eopc04_05.00", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(loader.getConfiguration("eopc04_05_IAU2000.00", 0).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("eopc04_05_IAU2000.00", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(loader.getConfiguration("eopc04_08.00", 0).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("eopc04_08.00", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2008));
Assert.assertThat(loader.getConfiguration("eopc04_08_IAU2000.00", 0).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("eopc04_08_IAU2000.00", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2008));
Assert.assertThat(loader.getConfiguration("eopc04_14.00", 0).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("eopc04_14.00", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2014));
Assert.assertThat(loader.getConfiguration("eopc04_14_IAU2000.00", 0).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("eopc04_14_IAU2000.00", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2014));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletina-xi-001.txt", 54000).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2000));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletina-xxi-001.txt", 55555).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletina-xxvi-001.txt", 57777).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2008));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletina-xxxi-001.txt", 58484).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2014));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletinb_IAU1980-123.txt", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletinb_IAU2000-123.txt", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletinb-123.txt", 55555).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletinb.123", 55555).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletinb-123.txt", 57777).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2008));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletinb.123", 57777).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2008));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletinb-123.txt", 58484).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2014));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("bulletinb.123", 58484).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2014));
Assert.assertThat(loader.getConfiguration("finals.all", 0).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("finals.all", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2000));
Assert.assertThat(loader.getConfiguration("finals2000A.all", 0).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("finals2000A.all", 0).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2000));
Assert.assertThat(loader.getConfiguration("finals.all", 55555).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("finals.all", 55555).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(loader.getConfiguration("finals2000A.all", 55555).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("finals2000A.all", 55555).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(loader.getConfiguration("finals.all", 57777).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("finals.all", 57777).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2008));
Assert.assertThat(loader.getConfiguration("finals2000A.all", 57777).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("finals2000A.all", 57777).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2008));
Assert.assertThat(loader.getConfiguration("finals.all", 58484).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("finals.all", 58484).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2014));
Assert.assertThat(loader.getConfiguration("finals2000A.all", 58484).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("finals2000A.all", 58484).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2014));
}
......@@ -117,17 +118,17 @@ public class ITRFVersionLoaderTest {
ItrfVersionProvider loader =
new ITRFVersionLoader(ITRFVersionLoader.SUPPORTED_NAMES);
Assert.assertThat(loader.getConfiguration("/finals.all", 55555).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("/finals.all", 55555).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(loader.getConfiguration("\\finals.all", 55555).getVersion(),
MatcherAssert.assertThat(loader.getConfiguration("\\finals.all", 55555).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(
MatcherAssert.assertThat(
loader .getConfiguration(
"https://user@example.com:port/path/finals.all?a=b#c",
55555)
.getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
Assert.assertThat(
MatcherAssert.assertThat(
loader.getConfiguration("a.zip!/finals.all", 55555).getVersion(),
CoreMatchers.is(ITRFVersion.ITRF_2005));
}
......
......@@ -23,6 +23,7 @@ import java.util.SortedSet;
import java.util.TreeSet;
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;
import org.junit.Assert;
import org.junit.Test;
import org.orekit.data.AbstractFilesLoaderTest;
......@@ -56,7 +57,7 @@ public class RapidDataAndPredictionXMLLoaderTest extends AbstractFilesLoaderTest
} catch (OrekitException e) {
// Malformed URL exception indicates external resource was disabled
// file not found exception indicates parser tried to load the resource
Assert.assertThat(e.getCause(),
MatcherAssert.assertThat(e.getCause(),
CoreMatchers.instanceOf(MalformedURLException.class));
}
......
......@@ -27,6 +27,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import org.hamcrest.MatcherAssert;
import org.hipparchus.analysis.UnivariateFunction;
import org.hipparchus.analysis.differentiation.DSFactory;
import org.hipparchus.analysis.differentiation.FiniteDifferencesDifferentiator;
......@@ -1085,21 +1086,21 @@ public class CircularOrbitTest {
orbit.getRightAscensionOfAscendingNodeDot(),
orbit.getAlphaDot(type),
type, orbit.getFrame(), orbit.getDate(), orbit.getMu());
Assert.assertThat(rebuilt.getA(), relativelyCloseTo(orbit.getA(), 1));
Assert.assertThat(rebuilt.getCircularEx(), relativelyCloseTo(orbit.getCircularEx(), 1));
Assert.assertThat(rebuilt.getCircularEy(), relativelyCloseTo(orbit.getCircularEy(), 1));
Assert.assertThat(rebuilt.getE(), relativelyCloseTo(orbit.getE(), 1));
Assert.assertThat(rebuilt.getI(), relativelyCloseTo(orbit.getI(), 1));
Assert.assertThat(rebuilt.getRightAscensionOfAscendingNode(), relativelyCloseTo(orbit.getRightAscensionOfAscendingNode(), 1));
Assert.assertThat(rebuilt.getADot(), relativelyCloseTo(orbit.getADot(), 1));