use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsOlderButCloseBothSnapshot.
@ParameterizedTest
@ValueSource(strings = { SUFFIX_SNAPSHOT, SUFFIX_SIGQA_1, SUFFIX_OTHER_TEXT })
public void testAlertIsOlderButCloseBothSnapshot(String versionSuffix) {
UpdateChecker updateChecker = getEmptyUpdateChecker();
OffsetDateTime alertTime = DateUtils.createCurrentDateTimestamp();
OffsetDateTime dockerTagDate = alertTime.plusMinutes(20);
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0-" + versionSuffix, formatDate(alertTime, DOCKER_DATE_FORMAT), "1.0.0-" + versionSuffix, formatDate(dockerTagDate, DOCKER_DATE_FORMAT), null);
assertFalse(updateModel.getUpdatable());
}
use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsNewer.
@Test
public void testAlertIsNewer() {
UpdateChecker updateChecker = getEmptyUpdateChecker();
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0", null, "0.1.0", null, null);
assertFalse(updateModel.getUpdatable());
}
use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsSame.
@Test
public void testAlertIsSame() {
UpdateChecker updateChecker = getEmptyUpdateChecker();
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0", null, "1.0.0", null, null);
assertFalse(updateModel.getUpdatable());
}
use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsOlder.
@Test
public void testAlertIsOlder() {
UpdateChecker updateChecker = getEmptyUpdateChecker();
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0", null, "1.0.1", null, null);
assertTrue(updateModel.getUpdatable());
}
use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsNewerSnapshot.
@ParameterizedTest
@ValueSource(strings = { SUFFIX_SNAPSHOT, SUFFIX_SIGQA_1, SUFFIX_OTHER_TEXT })
public void testAlertIsNewerSnapshot(String versionSuffix) {
UpdateChecker updateChecker = getEmptyUpdateChecker();
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0-" + versionSuffix, null, "0.1.0", null, null);
assertFalse(updateModel.getUpdatable());
}
Aggregations