Body of the test 1
Criteria testCriteria = new Criteria();
if (testCriteria == null) {
fail("Criteria create error");
}
// Test default values
if (!(testCriteria.getHorizontalAccuracy() ==
Criteria.NO_REQUIREMENT)) {
fail("Criteria: default value of horisontal accuracy" +
" is wrong");
}
if (!(testCriteria.getVerticalAccuracy() ==
Criteria.NO_REQUIREMENT)) {
fail("Criteria: default value of vertical accuracy" +
" is wrong");
}
if (!(testCriteria.getPreferredResponseTime() ==
Criteria.NO_REQUIREMENT)) {
fail("Criteria: default value of preferred response time" +
" is wrong");
}
if (!(testCriteria.getPreferredPowerConsumption() ==
Criteria.NO_REQUIREMENT)) {
fail("Criteria: default value of power consumption" +
" is wrong");
}
if (!(testCriteria.isAllowedToCost() == true)) {
fail("Criteria: on create should be allowed to cost");
}
if (!(testCriteria.isSpeedAndCourseRequired() == false)) {
fail("Criteria: on create the speed and the course" +
" shouldn't be required");
}
if (!(testCriteria.isAltitudeRequired() == false)) {
fail("Criteria: on create the altitude" +
" shouldn't be required");
}
if (!(testCriteria.isAddressInfoRequired() == false)) {
fail("Criteria: on create the textual address info" +
" shouldn't be required");
}
assertTrue("OK", true);