summaryrefslogtreecommitdiffstats
path: root/model/context-model/src
diff options
context:
space:
mode:
Diffstat (limited to 'model/context-model/src')
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java35
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java42
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java38
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java13
-rw-r--r--model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparisonTest.java51
5 files changed, 89 insertions, 90 deletions
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java
index 597aa3914..0406543fb 100644
--- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextAlbumsTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@
package org.onap.policy.apex.model.contextmodel.concepts;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -119,17 +118,17 @@ public class ContextAlbumsTest {
+ "scope=NewAlbumScope,isWritable=true,itemSchema="
+ "AxArtifactKey:(name=AlbumSchemaName,version=0.0.1))", clonedAlbum.toString());
- assertFalse(album.hashCode() == 0);
+ assertNotEquals(0, album.hashCode());
- assertTrue(album.equals(album));
- assertTrue(album.equals(clonedAlbum));
- assertFalse(album.equals(null));
- assertFalse(album.equals((Object) "Hello"));
- assertFalse(album.equals(new AxContextAlbum(new AxArtifactKey(), "Scope", false, AxArtifactKey.getNullKey())));
- assertFalse(album.equals(new AxContextAlbum(newKey, "Scope", false, AxArtifactKey.getNullKey())));
- assertFalse(album.equals(new AxContextAlbum(newKey, "NewAlbumScope", false, AxArtifactKey.getNullKey())));
- assertFalse(album.equals(new AxContextAlbum(newKey, "NewAlbumScope", true, AxArtifactKey.getNullKey())));
- assertTrue(album.equals(new AxContextAlbum(newKey, "NewAlbumScope", true, albumSchemaKey)));
+ assertEquals(album, album);
+ assertEquals(album, clonedAlbum);
+ assertNotNull(album);
+ assertNotEquals(album, (Object) "Hello");
+ assertNotEquals(album, new AxContextAlbum(new AxArtifactKey(), "Scope", false, AxArtifactKey.getNullKey()));
+ assertNotEquals(album, new AxContextAlbum(newKey, "Scope", false, AxArtifactKey.getNullKey()));
+ assertNotEquals(album, new AxContextAlbum(newKey, "NewAlbumScope", false, AxArtifactKey.getNullKey()));
+ assertNotEquals(album, new AxContextAlbum(newKey, "NewAlbumScope", true, AxArtifactKey.getNullKey()));
+ assertEquals(album, new AxContextAlbum(newKey, "NewAlbumScope", true, albumSchemaKey));
assertEquals(0, album.compareTo(album));
assertEquals(0, album.compareTo(clonedAlbum));
@@ -186,13 +185,13 @@ public class ContextAlbumsTest {
assertTrue(clonedAlbums.toString().startsWith(
"AxContextAlbums:(AxContextAlbums:(key=AxArtifactKey:(name=AlbumsKey,version=0.0.1)"));
- assertFalse(albums.hashCode() == 0);
+ assertNotEquals(0, albums.hashCode());
- assertTrue(albums.equals(albums));
- assertTrue(albums.equals(clonedAlbums));
- assertFalse(albums.equals(null));
- assertFalse(albums.equals((Object) "Hello"));
- assertFalse(albums.equals(new AxContextAlbums(new AxArtifactKey())));
+ assertEquals(albums, albums);
+ assertEquals(albums, clonedAlbums);
+ assertNotNull(albums);
+ assertNotEquals(albums, (Object) "Hello");
+ assertNotEquals(albums, new AxContextAlbums(new AxArtifactKey()));
assertEquals(0, albums.compareTo(albums));
assertEquals(0, albums.compareTo(clonedAlbums));
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java
index cac922cc4..1be226cbd 100644
--- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextModelTest.java
@@ -1,20 +1,20 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
@@ -22,10 +22,8 @@
package org.onap.policy.apex.model.contextmodel.concepts;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -33,7 +31,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
/**
* Context model tests.
- *
+ *
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class ContextModelTest {
@@ -60,22 +58,22 @@ public class ContextModelTest {
final AxContextModel clonedModel = new AxContextModel(model);
- assertFalse(model.hashCode() == 0);
+ assertNotEquals(0, model.hashCode());
- assertTrue(model.equals(model));
- assertTrue(model.equals(clonedModel));
- assertFalse(model.equals((Object) "Hello"));
- assertFalse(model.equals(new AxContextModel(new AxArtifactKey())));
- assertFalse(model.equals(new AxContextModel(new AxArtifactKey(), new AxContextSchemas(), new AxContextAlbums(),
- new AxKeyInformation())));
- assertFalse(model.equals(new AxContextModel(modelKey, new AxContextSchemas(), new AxContextAlbums(),
- new AxKeyInformation())));
- assertFalse(model.equals(new AxContextModel(modelKey, new AxContextSchemas(), new AxContextAlbums(),
- new AxKeyInformation(keyInfoKey))));
- assertFalse(model.equals(new AxContextModel(modelKey, new AxContextSchemas(schemasKey), new AxContextAlbums(),
- new AxKeyInformation(keyInfoKey))));
- assertTrue(model.equals(new AxContextModel(modelKey, new AxContextSchemas(schemasKey),
- new AxContextAlbums(albumsKey), new AxKeyInformation(keyInfoKey))));
+ assertEquals(model, model);
+ assertEquals(model, clonedModel);
+ assertNotEquals(model, (Object) "Hello");
+ assertNotEquals(model, new AxContextModel(new AxArtifactKey()));
+ assertNotEquals(model, new AxContextModel(new AxArtifactKey(), new AxContextSchemas(), new AxContextAlbums(),
+ new AxKeyInformation()));
+ assertNotEquals(model, new AxContextModel(modelKey, new AxContextSchemas(), new AxContextAlbums(),
+ new AxKeyInformation()));
+ assertNotEquals(model, new AxContextModel(modelKey, new AxContextSchemas(), new AxContextAlbums(),
+ new AxKeyInformation(keyInfoKey)));
+ assertNotEquals(model, new AxContextModel(modelKey, new AxContextSchemas(schemasKey), new AxContextAlbums(),
+ new AxKeyInformation(keyInfoKey)));
+ assertEquals(model, new AxContextModel(modelKey, new AxContextSchemas(schemasKey),
+ new AxContextAlbums(albumsKey), new AxKeyInformation(keyInfoKey)));
assertEquals(0, model.compareTo(model));
assertEquals(0, model.compareTo(clonedModel));
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java
index d72806a19..e5fc19a20 100644
--- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/concepts/ContextSchemasTest.java
@@ -1,19 +1,20 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
@@ -21,7 +22,6 @@
package org.onap.policy.apex.model.contextmodel.concepts;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -106,16 +106,16 @@ public class ContextSchemasTest {
+ "schemaFlavour=NewSchemaFlavour,schemaDefinition=NewSchemaDefinition)",
clonedSchema.toString());
- assertFalse(schema.hashCode() == 0);
+ assertNotEquals(0, schema.hashCode());
- assertTrue(schema.equals(schema));
- assertTrue(schema.equals(clonedSchema));
- assertFalse(schema.equals(null));
- assertFalse(schema.equals((Object) "Hello"));
- assertFalse(schema.equals(new AxContextSchema(new AxArtifactKey(), "Flavour", "Def")));
- assertFalse(schema.equals(new AxContextSchema(newKey, "Flavour", "Def")));
- assertFalse(schema.equals(new AxContextSchema(newKey, "NewSchemaFlavour", "Def")));
- assertTrue(schema.equals(new AxContextSchema(newKey, "NewSchemaFlavour", "NewSchemaDefinition")));
+ assertEquals(schema, schema);
+ assertEquals(schema, clonedSchema);
+ assertNotNull(schema);
+ assertNotEquals(schema, (Object) "Hello");
+ assertNotEquals(schema, new AxContextSchema(new AxArtifactKey(), "Flavour", "Def"));
+ assertNotEquals(schema, new AxContextSchema(newKey, "Flavour", "Def"));
+ assertNotEquals(schema, new AxContextSchema(newKey, "NewSchemaFlavour", "Def"));
+ assertEquals(schema, new AxContextSchema(newKey, "NewSchemaFlavour", "NewSchemaDefinition"));
assertEquals(0, schema.compareTo(schema));
assertEquals(0, schema.compareTo(clonedSchema));
@@ -168,13 +168,13 @@ public class ContextSchemasTest {
assertTrue(clonedSchemas.toString()
.startsWith("AxContextSchemas:(key=AxArtifactKey:(name=SchemasKey,version=0.0.1),"));
- assertFalse(schemas.hashCode() == 0);
+ assertNotEquals(0, schemas.hashCode());
- assertTrue(schemas.equals(schemas));
- assertTrue(schemas.equals(clonedSchemas));
- assertFalse(schemas.equals(null));
- assertFalse(schemas.equals((Object) "Hello"));
- assertFalse(schemas.equals(new AxContextSchemas(new AxArtifactKey())));
+ assertEquals(schemas, schemas);
+ assertEquals(schemas, clonedSchemas);
+ assertNotNull(schemas);
+ assertNotEquals(schemas, (Object) "Hello");
+ assertNotEquals(schemas, new AxContextSchemas(new AxArtifactKey()));
assertEquals(0, schemas.compareTo(schemas));
assertEquals(0, schemas.compareTo(clonedSchemas));
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java
index f41c39fd2..89a108ad8 100644
--- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ApexContextModelTest.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +21,7 @@
package org.onap.policy.apex.model.contextmodel.handling;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
@@ -51,31 +52,31 @@ public class ApexContextModelTest {
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();
- assertTrue(result.toString().equals(VALID_MODEL_STRING));
+ assertEquals(VALID_MODEL_STRING, result.toString());
}
@Test
public void testApexModelVaidateObservation() throws Exception {
final AxValidationResult result = testApexModel.testApexModelVaidateObservation();
- assertTrue(result.toString().equals(OBSERVATION_MODEL_STRING));
+ assertEquals(OBSERVATION_MODEL_STRING, result.toString());
}
@Test
public void testApexModelVaidateWarning() throws Exception {
final AxValidationResult result = testApexModel.testApexModelVaidateWarning();
- assertTrue(result.toString().equals(WARNING_MODEL_STRING));
+ assertEquals(WARNING_MODEL_STRING, result.toString());
}
@Test
public void testModelVaidateInvalidModel() throws Exception {
final AxValidationResult result = testApexModel.testApexModelVaidateInvalidModel();
- assertTrue(result.toString().equals(INVALID_MODEL_STRING));
+ assertEquals(INVALID_MODEL_STRING, result.toString());
}
@Test
public void testModelVaidateMalstructured() throws Exception {
final AxValidationResult result = testApexModel.testApexModelVaidateMalstructured();
- assertTrue(result.toString().equals(INVALID_MODEL_MALSTRUCTURED_STRING));
+ assertEquals(INVALID_MODEL_MALSTRUCTURED_STRING, result.toString());
}
@Test
diff --git a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparisonTest.java b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparisonTest.java
index 53e43a80a..483bc3661 100644
--- a/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparisonTest.java
+++ b/model/context-model/src/test/java/org/onap/policy/apex/model/contextmodel/handling/ContextComparisonTest.java
@@ -1,27 +1,28 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
package org.onap.policy.apex.model.contextmodel.handling;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
@@ -33,7 +34,7 @@ import org.onap.policy.apex.model.utilities.comparison.KeyedMapDifference;
/**
* Test context comparisons.
- *
+ *
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class ContextComparisonTest {
@@ -61,12 +62,12 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(emptyModel.getSchemas(), emptyModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(emptyModel.getSchemas().getSchemasMap().equals(schemaResult.getIdenticalValues()));
+ assertEquals(emptyModel.getSchemas().getSchemasMap(), schemaResult.getIdenticalValues());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(emptyModel.getAlbums(), emptyModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(emptyModel.getAlbums().getAlbumsMap().equals(albumResult.getIdenticalValues()));
+ assertEquals(emptyModel.getAlbums().getAlbumsMap(), albumResult.getIdenticalValues());
}
@Test
@@ -74,12 +75,12 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(emptyModel.getSchemas(), fullModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(fullModel.getSchemas().getSchemasMap().equals(schemaResult.getRightOnly()));
+ assertEquals(fullModel.getSchemas().getSchemasMap(), schemaResult.getRightOnly());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(emptyModel.getAlbums(), fullModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(fullModel.getAlbums().getAlbumsMap().equals(albumResult.getRightOnly()));
+ assertEquals(fullModel.getAlbums().getAlbumsMap(), albumResult.getRightOnly());
}
@Test
@@ -87,12 +88,12 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(fullModel.getSchemas(), emptyModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(fullModel.getSchemas().getSchemasMap().equals(schemaResult.getLeftOnly()));
+ assertEquals(fullModel.getSchemas().getSchemasMap(), schemaResult.getLeftOnly());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(fullModel.getAlbums(), emptyModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(fullModel.getAlbums().getAlbumsMap().equals(albumResult.getLeftOnly()));
+ assertEquals(fullModel.getAlbums().getAlbumsMap(), albumResult.getLeftOnly());
}
@Test
@@ -100,12 +101,12 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(emptyModel.getSchemas(), noGlobalContextModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(noGlobalContextModel.getSchemas().getSchemasMap().equals(schemaResult.getRightOnly()));
+ assertEquals(noGlobalContextModel.getSchemas().getSchemasMap(), schemaResult.getRightOnly());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(emptyModel.getAlbums(), noGlobalContextModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(noGlobalContextModel.getAlbums().getAlbumsMap().equals(albumResult.getRightOnly()));
+ assertEquals(noGlobalContextModel.getAlbums().getAlbumsMap(), albumResult.getRightOnly());
}
@Test
@@ -113,12 +114,12 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(noGlobalContextModel.getSchemas(), emptyModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(noGlobalContextModel.getSchemas().getSchemasMap().equals(schemaResult.getLeftOnly()));
+ assertEquals(noGlobalContextModel.getSchemas().getSchemasMap(), schemaResult.getLeftOnly());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(noGlobalContextModel.getAlbums(), emptyModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(noGlobalContextModel.getAlbums().getAlbumsMap().equals(albumResult.getLeftOnly()));
+ assertEquals(noGlobalContextModel.getAlbums().getAlbumsMap(), albumResult.getLeftOnly());
}
@Test
@@ -126,12 +127,12 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(emptyModel.getSchemas(), shellModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(shellModel.getSchemas().getSchemasMap().equals(schemaResult.getRightOnly()));
+ assertEquals(shellModel.getSchemas().getSchemasMap(), schemaResult.getRightOnly());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(emptyModel.getAlbums(), shellModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(shellModel.getAlbums().getAlbumsMap().equals(albumResult.getRightOnly()));
+ assertEquals(shellModel.getAlbums().getAlbumsMap(), albumResult.getRightOnly());
}
@Test
@@ -139,12 +140,12 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(shellModel.getSchemas(), emptyModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(shellModel.getSchemas().getSchemasMap().equals(schemaResult.getLeftOnly()));
+ assertEquals(shellModel.getSchemas().getSchemasMap(), schemaResult.getLeftOnly());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(shellModel.getAlbums(), emptyModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(shellModel.getAlbums().getAlbumsMap().equals(albumResult.getLeftOnly()));
+ assertEquals(shellModel.getAlbums().getAlbumsMap(), albumResult.getLeftOnly());
}
@Test
@@ -152,12 +153,12 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(emptyModel.getSchemas(), singleEntryModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(singleEntryModel.getSchemas().getSchemasMap().equals(schemaResult.getRightOnly()));
+ assertEquals(singleEntryModel.getSchemas().getSchemasMap(), schemaResult.getRightOnly());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(emptyModel.getAlbums(), singleEntryModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(singleEntryModel.getAlbums().getAlbumsMap().equals(albumResult.getRightOnly()));
+ assertEquals(singleEntryModel.getAlbums().getAlbumsMap(), albumResult.getRightOnly());
}
@Test
@@ -165,12 +166,12 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(singleEntryModel.getSchemas(), emptyModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(singleEntryModel.getSchemas().getSchemasMap().equals(schemaResult.getLeftOnly()));
+ assertEquals(singleEntryModel.getSchemas().getSchemasMap(), schemaResult.getLeftOnly());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(singleEntryModel.getAlbums(), emptyModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(singleEntryModel.getAlbums().getAlbumsMap().equals(albumResult.getLeftOnly()));
+ assertEquals(singleEntryModel.getAlbums().getAlbumsMap(), albumResult.getLeftOnly());
}
@Test
@@ -178,11 +179,11 @@ public class ContextComparisonTest {
final KeyedMapDifference<AxArtifactKey, AxContextSchema> schemaResult = new ContextComparer()
.compare(fullModel.getSchemas(), fullModel.getSchemas());
assertNotNull(schemaResult);
- assertTrue(fullModel.getSchemas().getSchemasMap().equals(schemaResult.getIdenticalValues()));
+ assertEquals(fullModel.getSchemas().getSchemasMap(), schemaResult.getIdenticalValues());
final KeyedMapDifference<AxArtifactKey, AxContextAlbum> albumResult = new ContextComparer()
.compare(fullModel.getAlbums(), fullModel.getAlbums());
assertNotNull(albumResult);
- assertTrue(fullModel.getAlbums().getAlbumsMap().equals(albumResult.getIdenticalValues()));
+ assertEquals(fullModel.getAlbums().getAlbumsMap(), albumResult.getIdenticalValues());
}
}