Removed boiler plate code. Added missing equals in model. Fixed sonar

issues.

Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-03-26 09:26:48 +01:00
parent f237a1e508
commit 080f7d20e8
12 changed files with 247 additions and 113 deletions

View File

@@ -54,15 +54,11 @@ import ru.yandex.qatools.allure.annotations.Stories;
@Stories("Target Management")
public class TargetManagementTest extends AbstractIntegrationTest {
@Test
@Test(expected = TenantNotExistException.class)
@Description("Ensures that targets cannot be created e.g. in plug'n play scenarios when tenant does not exists.")
@WithUser(tenantId = "tenantWhichDoesNotExists", allSpPermissions = true, autoCreateTenant = false)
public void createTargetForTenantWhichDoesNotExistThrowsTenantNotExistException() {
try {
targetManagement.createTarget(new Target("targetId123"));
fail("tenant not exist");
} catch (final TenantNotExistException e) {
}
targetManagement.createTarget(new Target("targetId123"));
}
@Test