summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/test')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java10
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java10
2 files changed, 6 insertions, 14 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java
index e3e6924b7e..fddb76efe6 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactBusinessLogicTest.java
@@ -65,10 +65,7 @@ import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade
import org.openecomp.sdc.be.model.operations.api.IGraphLockOperation;
import org.openecomp.sdc.be.model.operations.api.IInterfaceLifecycleOperation;
import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
-import org.openecomp.sdc.be.model.operations.impl.ArtifactOperation;
-import org.openecomp.sdc.be.model.operations.impl.UserAdminOperation;
import org.openecomp.sdc.be.resources.data.DAOArtifactData;
-import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
import org.openecomp.sdc.be.servlets.RepresentationUtils;
import org.openecomp.sdc.be.tosca.CsarUtils;
import org.openecomp.sdc.be.tosca.ToscaExportHandler;
@@ -573,7 +570,6 @@ public class ArtifactBusinessLogicTest extends BaseBusinessLogicMock{
@Test
public void testDeleteComponent_ArtifactNotFound(){
- Either<Either<ArtifactDefinition, Operation>, ResponseFormat> result;
Resource resource = new Resource();
String uniqueId = "uniqueId";
resource.setUniqueId(uniqueId);
@@ -593,9 +589,9 @@ public class ArtifactBusinessLogicTest extends BaseBusinessLogicMock{
.thenReturn(StorageOperationStatus.OK);
when(graphLockOperation.unlockComponent(uniqueId, NodeTypeEnum.Resource))
.thenReturn(StorageOperationStatus.OK);
- result = artifactBL.handleDelete("parentId", "artifactId", USER, AuditingActionEnum.ARTIFACT_DELETE,
- ComponentTypeEnum.RESOURCE, resource,
- true, false);
+ Either<ArtifactDefinition, ResponseFormat> result = artifactBL.handleDelete(
+ "parentId", "artifactId", USER,
+ resource, true, false);
assertThat(result.isRight()).isTrue();
}
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java
index cd171d9b65..6f0b83b0d5 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogicTest.java
@@ -2373,12 +2373,8 @@ public class ArtifactsBusinessLogicTest extends BaseBusinessLogicMock {
String parentId = "parentId";
String artifactId = "artifactId";
- AuditingActionEnum auditingAction = AuditingActionEnum.ARTIFACT_DELETE;
ArtifactDefinition artifactDefinition = new ArtifactDefinition();
Resource resource = new Resource();
- ComponentTypeEnum componentType = ComponentTypeEnum.RESOURCE;
- boolean shouldUnlock = true;
- boolean inTransaction = false;
User user = new User();
artifactDefinition.setArtifactName("test.csar");
@@ -2405,9 +2401,9 @@ public class ArtifactsBusinessLogicTest extends BaseBusinessLogicMock {
when(artifactCassandraDao.deleteArtifact(any()))
.thenReturn(CassandraOperationStatus.OK);
- Either<Either<ArtifactDefinition, Operation>, ResponseFormat> result = artifactBL.handleDelete(parentId, artifactId, user, auditingAction, componentType, resource, shouldUnlock, inTransaction);
- Either<ArtifactDefinition, Operation> leftValue = result.left().value();
- Assert.assertEquals(artifactDefinition.getArtifactName(), leftValue.left().value().getArtifactName());
+ Either<ArtifactDefinition, ResponseFormat> result = artifactBL.handleDelete(
+ parentId, artifactId, user, resource, true, false);
+ Assert.assertEquals(artifactDefinition.getArtifactName(), result.left().value().getArtifactName());
}
@Test