@@ -83,6 +83,7 @@ public void getLicense() throws IOException {
8383 GHLicense license = gitHub .getLicense (key );
8484 assertThat (license , notNullValue ());
8585 assertThat ("The name is correct" , license .getName (), equalTo ("MIT License" ));
86+ assertThat ("The SPDX ID is correct" , license .getSpdxId (), is (equalTo ("MIT" )));
8687 assertThat ("The HTML URL is correct" ,
8788 license .getHtmlUrl (),
8889 equalTo (new URL ("http://choosealicense.com/licenses/mit/" )));
@@ -111,6 +112,7 @@ public void checkRepositoryLicense() throws IOException {
111112 GHLicense license = repo .getLicense ();
112113 assertThat ("The license is populated" , license , notNullValue ());
113114 assertThat ("The key is correct" , license .getKey (), equalTo ("mit" ));
115+ assertThat ("The SPDX ID is correct" , license .getSpdxId (), is (equalTo ("MIT" )));
114116 assertThat ("The name is correct" , license .getName (), equalTo ("MIT License" ));
115117 assertThat ("The URL is correct" ,
116118 license .getUrl (),
@@ -129,6 +131,7 @@ public void checkRepositoryLicenseAtom() throws IOException {
129131 GHLicense license = repo .getLicense ();
130132 assertThat ("The license is populated" , license , notNullValue ());
131133 assertThat ("The key is correct" , license .getKey (), equalTo ("mit" ));
134+ assertThat ("The SPDX ID is correct" , license .getSpdxId (), is (equalTo ("MIT" )));
132135 assertThat ("The name is correct" , license .getName (), equalTo ("MIT License" ));
133136 assertThat ("The URL is correct" ,
134137 license .getUrl (),
@@ -148,6 +151,7 @@ public void checkRepositoryLicensePomes() throws IOException {
148151 GHLicense license = repo .getLicense ();
149152 assertThat ("The license is populated" , license , notNullValue ());
150153 assertThat ("The key is correct" , license .getKey (), equalTo ("apache-2.0" ));
154+ assertThat ("The SPDX ID is correct" , license .getSpdxId (), is (equalTo ("Apache-2.0" )));
151155 assertThat ("The name is correct" , license .getName (), equalTo ("Apache License 2.0" ));
152156 assertThat ("The URL is correct" ,
153157 license .getUrl (),
@@ -181,6 +185,7 @@ public void checkRepositoryFullLicense() throws IOException {
181185 GHLicense license = repo .getLicense ();
182186 assertThat ("The license is populated" , license , notNullValue ());
183187 assertThat ("The key is correct" , license .getKey (), equalTo ("mit" ));
188+ assertThat ("The SPDX ID is correct" , license .getSpdxId (), is (equalTo ("MIT" )));
184189 assertThat ("The name is correct" , license .getName (), equalTo ("MIT License" ));
185190 assertThat ("The URL is correct" ,
186191 license .getUrl (),
0 commit comments