use of org.estatio.module.application.app.AdminDashboard in project estatio by estatio.
the class AdminDashboard_patchDatabase_IntegTest method happyCase.
@Test
public void happyCase() throws Exception {
// given
final AdminDashboard dashboard = administrationMenu.openAdminDashboard();
Country country = Country_enum.GBR.findUsing(serviceRegistry);
final Long id = factoryService.mixin(Persistable_datanucleusIdLong.class, country).prop();
// when
final String newName = "Great Britain";
final String sql = String.format("UPDATE \"incodeCountry\".\"Country\" SET \"name\" = '%s' WHERE \"id\" = %d", newName, id);
dashboard.patchDatabase(sql);
sessionManagementService.nextSession();
// then
country = Country_enum.GBR.findUsing(serviceRegistry);
Assertions.assertThat(country.getName()).isEqualTo(newName);
}
Aggregations