use of pageobjects.licenses.LicenseItem in project sonarqube by SonarSource.
the class LicensesPageTest method change_licenses.
@Test
public void change_licenses() {
String EXAMPLE_LICENSE = "TmFtZTogRGV2ZWxvcHBlcnMKUGx1Z2luOiBhdXRvY29udHJvbApFeHBpcmVzOiAyMDEyLTA0LTAxCktleTogNjI5N2MxMzEwYzg2NDZiZTE5MDU1MWE4ZmZmYzk1OTBmYzEyYTIyMgo=";
LicensesPage page = nav.logIn().asAdmin().openLicenses();
LicenseItem licenseItem = page.getLicenseByKey("typed.license.secured");
licenseItem.setLicense(EXAMPLE_LICENSE);
ValuesWsResponse response = wsClient.settingsService().values(ValuesRequest.builder().setKeys("typed.license.secured").build());
assertThat(response.getSettings(0).getValue()).isEqualTo(EXAMPLE_LICENSE);
}
Aggregations