X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Fmodel-loader.git;a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fmodelloader%2Fentity%2Fmodel%2FTestModelArtifactHandler.java;fp=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fmodelloader%2Fentity%2Fmodel%2FTestModelArtifactHandler.java;h=5ccd1d2cc44e6c78f4463d428e5874422b3e1d5c;hp=b7a8cf265cd705c5ce4a9b9e4488742e264eb3d6;hb=211189e641f5b3aef7b02f47d5e82e522c8c592f;hpb=35e3de3f0d5b2b02fc6ef92ec577fe6b7cd05e3c diff --git a/src/test/java/org/onap/aai/modelloader/entity/model/TestModelArtifactHandler.java b/src/test/java/org/onap/aai/modelloader/entity/model/TestModelArtifactHandler.java index b7a8cf2..5ccd1d2 100644 --- a/src/test/java/org/onap/aai/modelloader/entity/model/TestModelArtifactHandler.java +++ b/src/test/java/org/onap/aai/modelloader/entity/model/TestModelArtifactHandler.java @@ -21,7 +21,11 @@ package org.onap.aai.modelloader.entity.model; import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.isEmptyString; import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -61,6 +65,7 @@ public class TestModelArtifactHandler { ModelArtifactHandler handler = new ModelArtifactHandler(config); handler.pushArtifacts(Collections.emptyList(), "", Collections.emptyList(), aaiClient); handler.rollback(Collections.emptyList(), "", aaiClient); + assertTrue(true); } @Test @@ -72,6 +77,7 @@ public class TestModelArtifactHandler { List artifacts = Collections.singletonList(new ModelArtifact()); handler.pushArtifacts(artifacts, "", Collections.emptyList(), aaiClient); handler.rollback(Collections.emptyList(), "", aaiClient); + assertThat(artifacts, hasSize(1)); } @Test @@ -89,7 +95,7 @@ public class TestModelArtifactHandler { ModelArtifactHandler handler = new ModelArtifactHandler(config); boolean pushed = handler.pushArtifacts(artifacts, "", Collections.emptyList(), aaiClient); - assertThat(pushed, is(true)); + assertTrue(pushed); handler.rollback(artifacts, "", aaiClient); }