Skip to content
Snippets Groups Projects

feat(license): [AOU-502] Add a sorting mecanism for licenses

Merged Florent Poittevin requested to merge fpo/502_add_a_sorting_mecanism_for_licenses into master
6 files
+ 52
2
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -32,6 +32,7 @@ class LicenseIT extends AbstractAdminIT {
// Create a license
License expectedLicense = new License();
expectedLicense.setTitle(AouConstants.TEMPORARY_TEST_DATA_LABEL + "GNU Free Documentation License ");
expectedLicense.setSortValue(10);
final String gnuLicense = "GNU" + ThreadLocalRandom.current().nextInt();
expectedLicense.setOpenLicenseId(gnuLicense);
expectedLicense = this.licenseService.create(expectedLicense);
@@ -59,6 +60,7 @@ class LicenseIT extends AbstractAdminIT {
License expectedLicense = new License();
expectedLicense.setTitle(AouConstants.TEMPORARY_TEST_DATA_LABEL + "License " + ThreadLocalRandom.current().nextInt());
expectedLicense.setOpenLicenseId("License " + ThreadLocalRandom.current().nextInt());
expectedLicense.setSortValue(10);
expectedLicense = this.licenseService.create(expectedLicense);
// Delete
@@ -76,6 +78,7 @@ class LicenseIT extends AbstractAdminIT {
final License expectedLicense = new License();
expectedLicense.setTitle(AouConstants.TEMPORARY_TEST_DATA_LABEL + " License " + ThreadLocalRandom.current().nextInt());
expectedLicense.setOpenLicenseId("License " + ThreadLocalRandom.current().nextInt());
expectedLicense.setSortValue(10);
this.licenseService.create(expectedLicense);
@@ -162,6 +165,7 @@ class LicenseIT extends AbstractAdminIT {
assertEquals(expectedLicense.getOdConformance(), actualLicense.getOsdConformance());
assertEquals(expectedLicense.getOsdConformance(), actualLicense.getOsdConformance());
assertEquals(expectedLicense.getStatus(), actualLicense.getStatus());
assertEquals(expectedLicense.getSortValue(), actualLicense.getSortValue());
assertEquals(expectedLicense.getUrl(), actualLicense.getUrl());
assertEquals(expectedLicense.getOpenLicenseId() + " (" + expectedLicense.getTitle() + ")", actualLicense.getDescription());
}
Loading