Skip to content
Snippets Groups Projects
Commit 12193a9f authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Improved test coverage.

parent 417a45d6
No related branches found
No related tags found
No related merge requests found
Pipeline #1729 passed
......@@ -96,6 +96,18 @@ public class RuggedMessagesTest {
}
}
@Test
public void testMissingLanguageMissingTranslation() {
Assert.assertEquals(RuggedMessages.INTERNAL_ERROR.getSourceString(),
RuggedMessages.INTERNAL_ERROR.getLocalizedString(Locale.KOREAN));
Assert.assertEquals(RuggedMessages.NO_DEM_DATA.getSourceString(),
RuggedMessages.NO_DEM_DATA.getLocalizedString(Locale.KOREAN));
Assert.assertEquals("ABCDEF {0}",
RuggedMessages.UNKNOWN_SENSOR.getLocalizedString(Locale.KOREAN));
Assert.assertEquals(RuggedMessages.EMPTY_TILE.getSourceString(),
RuggedMessages.EMPTY_TILE.getLocalizedString(Locale.KOREAN));
}
@Test
public void testVariablePartsConsistency() {
for (final String language : LANGUAGES_LIST) {
......
......@@ -46,6 +46,8 @@ import org.orekit.orbits.PositionAngle;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.analytical.KeplerianPropagator;
import org.orekit.rugged.TestUtils;
import org.orekit.rugged.errors.RuggedException;
import org.orekit.rugged.errors.RuggedMessages;
import org.orekit.rugged.linesensor.SensorMeanPlaneCrossing.CrossingResult;
import org.orekit.rugged.los.LOSBuilder;
import org.orekit.rugged.utils.SpacecraftToObservedBody;
......@@ -146,8 +148,7 @@ public class SensorMeanPlaneCrossingTest {
private void doTestDerivative(boolean lightTimeCorrection,
boolean aberrationOfLightCorrection,
double tol)
{
double tol) {
final Vector3D position = new Vector3D(1.5, Vector3D.PLUS_I);
final Vector3D normal = Vector3D.PLUS_I;
......@@ -215,6 +216,20 @@ public class SensorMeanPlaneCrossingTest {
Vector3D.distance(result.getTargetDirectionDerivative(), dirDer),
tol * dirDer.getNorm());
try {
mean.getScToBody().getBodyToInertial(refDate.shiftedBy(-Constants.JULIAN_CENTURY));
Assert.fail("an exception should have been thrown");
} catch (RuggedException re) {
Assert.assertEquals(RuggedMessages.OUT_OF_TIME_RANGE, re.getSpecifier());
}
try {
mean.getScToBody().getBodyToInertial(refDate.shiftedBy(Constants.JULIAN_CENTURY));
Assert.fail("an exception should have been thrown");
} catch (RuggedException re) {
Assert.assertEquals(RuggedMessages.OUT_OF_TIME_RANGE, re.getSpecifier());
}
Assert.assertNotNull(mean.getScToBody().getBodyToInertial(refDate));
}
@Test
......
# no Digital Elevation Model data at latitude {0} and longitude {1}
NO_DEM_DATA = <MISSING TRANSLATION>
# unknown sensor {0}
UNKNOWN_SENSOR = ABCDEF {0}
# tile is empty: {0} ⨉ {1}
EMPTY_TILE =
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment