File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/test/java/org/spdx/library Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 3131import org .spdx .storage .compatv2 .CompatibleModelStoreWrapper ;
3232
3333import junit .framework .TestCase ;
34- import org .spdx .utility .compare .UnitTestHelper ;
3534
3635
3736/**
@@ -162,7 +161,18 @@ public void testGetLicenseIdProperty() throws InvalidSPDXAnalysisException {
162161 assertTrue (idProp .get () instanceof String );
163162 assertEquals (id , idProp .get ());
164163 }
165-
164+
165+ public void testGetIdV2 () throws InvalidSPDXAnalysisException {
166+ String id = "Apache-2.0" ;
167+ SpdxListedLicense lic = ListedLicenses .getListedLicenses ().getListedLicenseByIdCompatV2 (id );
168+ assertEquals (id , lic .getId ());
169+ }
170+
171+ public void testGetIdV3 () throws InvalidSPDXAnalysisException {
172+ String id = "Apache-2.0" ;
173+ ListedLicense lic = ListedLicenses .getListedLicenses ().getListedLicenseById (id );
174+ assertEquals (id , lic .getId ());
175+ }
166176 public void testGetExceptionIdProperty () throws InvalidSPDXAnalysisException {
167177 String id = "Classpath-exception-2.0" ;
168178 org .spdx .library .model .v2 .license .ListedLicenseException ex = ListedLicenses .getListedLicenses ().getListedExceptionByIdCompatV2 (id );
You can’t perform that action at this time.
0 commit comments