From aec59a7e915c4d73282717444db8abf26ed562b0 Mon Sep 17 00:00:00 2001 From: vramik Date: Tue, 31 Jan 2017 13:24:06 +0100 Subject: [PATCH] refactor asserts in ExportImportTest to be more verbose --- .../keycloak/testsuite/exportimport/ExportImportTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java index 260eefecfa..ae3a4a9f00 100755 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java @@ -155,7 +155,7 @@ public class ExportImportTest extends AbstractKeycloakTest { removeRealm("test"); removeRealm("test-realm"); - assertEquals(1, adminClient.realms().findAll().size()); + Assert.assertNames(adminClient.realms().findAll(), "master"); assertNotAuthenticated("test", "test-user@localhost", "password"); assertNotAuthenticated("test", "user1", "password"); @@ -168,7 +168,7 @@ public class ExportImportTest extends AbstractKeycloakTest { testingClient.testing().exportImport().runImport(); // Ensure data are imported back - assertEquals(3, adminClient.realms().findAll().size()); + Assert.assertNames(adminClient.realms().findAll(), "master", "test", "test-realm"); assertAuthenticated("test", "test-user@localhost", "password"); assertAuthenticated("test", "user1", "password"); @@ -191,7 +191,7 @@ public class ExportImportTest extends AbstractKeycloakTest { // Delete some realm (and some data in admin realm) adminClient.realm("test").remove(); - assertEquals(2, adminClient.realms().findAll().size()); + Assert.assertNames(adminClient.realms().findAll(), "test-realm", "master"); assertNotAuthenticated("test", "test-user@localhost", "password"); assertNotAuthenticated("test", "user1", "password"); @@ -204,7 +204,7 @@ public class ExportImportTest extends AbstractKeycloakTest { testingClient.testing().exportImport().runImport(); // Ensure data are imported back, but just for "test" realm - assertEquals(3, adminClient.realms().findAll().size()); + Assert.assertNames(adminClient.realms().findAll(), "master", "test", "test-realm"); assertAuthenticated("test", "test-user@localhost", "password"); assertAuthenticated("test", "user1", "password");