add more unit tests remove imports 07/19807/1
authorYuli Shlosberg <ys9693@att.com>
Thu, 19 Oct 2017 20:39:36 +0000 (23:39 +0300)
committerYuli Shlosberg <ys9693@att.com>
Thu, 19 Oct 2017 20:41:33 +0000 (23:41 +0300)
Change-Id: If2274759f929f595e63d71cc70c374268c019947
Issue-Id: SDC-467
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
35 files changed:
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/DataMigration.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/GraphJsonValidator.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/PopulateComponentCache.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/ProductLogic.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/RestUtils.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/ValidationToolBL.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationToolConfiguration.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/ServiceValidatorExecuter.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/TopologyTemplateValidatorExecuter.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/ValidatorExecuter.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/executers/VfValidatorExecuter.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/ArtifactValidationUtils.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/artifacts/ArtifactsVertexResult.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/tasks/moduleJson/ModuleJsonTask.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/utils/ElementTypeEnum.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/utils/ReportManager.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/utils/ValidationTaskResult.java
asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/core/SdcMigrationTool.java
asdctool/src/test/java/org/openecomp/sdc/asdctool/AppTest.java [deleted file]
asdctool/src/test/java/org/openecomp/sdc/asdctool/servlets/EntryPointTest.java [new file with mode: 0644]
catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java [new file with mode: 0644]
catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java [new file with mode: 0644]
catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java [new file with mode: 0644]
catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java [new file with mode: 0644]
catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java [new file with mode: 0644]
catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java [new file with mode: 0644]
catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java [new file with mode: 0644]
catalog-dao/src/test/java/org/openecomp/sdc/be/dao/AccountTest.java
catalog-dao/src/test/java/org/openecomp/sdc/be/resources/exception/ResourceDAOExceptionTest.java [new file with mode: 0644]
catalog-fe/src/test/java/org/openecomp/sdc/fe/GzipFilterTest.java [new file with mode: 0644]
catalog-fe/src/test/java/org/openecomp/sdc/fe/client/BackendClientTest.java [new file with mode: 0644]
catalog-fe/src/test/java/org/openecomp/sdc/fe/listen/MyObjectMapperProviderTest.java [new file with mode: 0644]
catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PortalServletTest.java [new file with mode: 0644]
catalog-model/src/test/java/org/openecomp/sdc/be/model/jsontitan/operations/ToscaElementOperationTest.java
catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/ToscaTypeTest.java [new file with mode: 0644]

index eafec8b..9b1e3dc 100644 (file)
 
 package org.openecomp.sdc.asdctool.impl;
 
-import com.carrotsearch.hppc.cursors.ObjectCursor;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-import fj.data.Either;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.lang.reflect.Type;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.EnumMap;
+import java.util.Map;
+import java.util.TimeZone;
+
 import org.apache.commons.lang.SystemUtils;
 import org.elasticsearch.action.search.SearchResponse;
 import org.elasticsearch.cluster.metadata.IndexMetaData;
@@ -40,25 +55,34 @@ import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
 import org.openecomp.sdc.be.dao.cassandra.schema.Table;
 import org.openecomp.sdc.be.dao.es.ElasticSearchClient;
 import org.openecomp.sdc.be.resources.data.ESArtifactData;
-import org.openecomp.sdc.be.resources.data.auditing.*;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingGenericEvent;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingGetUebClusterEvent;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
+import org.openecomp.sdc.be.resources.data.auditing.AuthEvent;
+import org.openecomp.sdc.be.resources.data.auditing.CategoryEvent;
+import org.openecomp.sdc.be.resources.data.auditing.ConsumerEvent;
+import org.openecomp.sdc.be.resources.data.auditing.DistributionDeployEvent;
+import org.openecomp.sdc.be.resources.data.auditing.DistributionDownloadEvent;
+import org.openecomp.sdc.be.resources.data.auditing.DistributionEngineEvent;
+import org.openecomp.sdc.be.resources.data.auditing.DistributionNotificationEvent;
+import org.openecomp.sdc.be.resources.data.auditing.DistributionStatusEvent;
+import org.openecomp.sdc.be.resources.data.auditing.GetCategoryHierarchyEvent;
+import org.openecomp.sdc.be.resources.data.auditing.GetUsersListEvent;
+import org.openecomp.sdc.be.resources.data.auditing.ResourceAdminEvent;
+import org.openecomp.sdc.be.resources.data.auditing.UserAccessEvent;
+import org.openecomp.sdc.be.resources.data.auditing.UserAdminEvent;
 import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import java.io.*;
-import java.lang.reflect.Type;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.EnumMap;
-import java.util.Map;
-import java.util.TimeZone;
+import com.carrotsearch.hppc.cursors.ObjectCursor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+import fj.data.Either;
 
 /**
  * Created by mlando on 5/16/2016.
index 1ce976d..23019b9 100644 (file)
 package org.openecomp.sdc.asdctool.impl;
 
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Paths;
@@ -32,6 +28,11 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 /**
  * simple util class to verify that the titan export json graph is not corrupted
  */
index eac9726..b67bfc8 100644 (file)
@@ -20,9 +20,7 @@
 
 package org.openecomp.sdc.asdctool.impl;
 
-import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 import java.util.concurrent.Callable;
@@ -36,9 +34,7 @@ import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
 import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.model.Component;
-import org.openecomp.sdc.be.model.Product;
 import org.openecomp.sdc.be.model.Resource;
-import org.openecomp.sdc.be.model.Service;
 import org.openecomp.sdc.be.model.cache.ComponentCache;
 import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade;
 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
index 9f15c83..7ed8b17 100644 (file)
 
 package org.openecomp.sdc.asdctool.impl;
 
-import com.thinkaurelius.titan.core.TitanFactory;
-import com.thinkaurelius.titan.core.TitanGraph;
-import com.thinkaurelius.titan.core.TitanVertex;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
+import com.thinkaurelius.titan.core.TitanFactory;
+import com.thinkaurelius.titan.core.TitanGraph;
+import com.thinkaurelius.titan.core.TitanVertex;
 
 /**
  * Created by mlando on 2/23/2016.
index c2ebc24..355780c 100644 (file)
 
 package org.openecomp.sdc.asdctool.impl;
 
+import java.io.IOException;
+
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpDelete;
 import org.apache.http.client.methods.HttpUriRequest;
-
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-
 /**
  * Created by mlando on 2/23/2016.
  */
index a57a237..e373107 100644 (file)
@@ -1,5 +1,7 @@
 package org.openecomp.sdc.asdctool.impl.validator;
 
+import java.util.List;
+
 import org.openecomp.sdc.asdctool.impl.validator.executers.ValidatorExecuter;
 import org.openecomp.sdc.asdctool.impl.validator.utils.ReportManager;
 import org.slf4j.Logger;
@@ -7,8 +9,6 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.util.*;
-
 /**
  * Created by chaya on 7/3/2017.
  */
index 0e6b2c7..3b81ba8 100644 (file)
@@ -1,11 +1,11 @@
 package org.openecomp.sdc.asdctool.impl.validator.config;
 
+import org.openecomp.sdc.asdctool.impl.validator.ValidationToolBL;
+import org.openecomp.sdc.asdctool.impl.validator.executers.ServiceValidatorExecuter;
+import org.openecomp.sdc.asdctool.impl.validator.executers.VfValidatorExecuter;
 import org.openecomp.sdc.asdctool.impl.validator.tasks.artifacts.ArtifactValidationUtils;
 import org.openecomp.sdc.asdctool.impl.validator.tasks.artifacts.ServiceArtifactValidationTask;
 import org.openecomp.sdc.asdctool.impl.validator.tasks.artifacts.VfArtifactValidationTask;
-import org.openecomp.sdc.asdctool.impl.validator.executers.ServiceValidatorExecuter;
-import org.openecomp.sdc.asdctool.impl.validator.executers.VfValidatorExecuter;
-import org.openecomp.sdc.asdctool.impl.validator.ValidationToolBL;
 import org.openecomp.sdc.asdctool.impl.validator.tasks.moduleJson.ModuleJsonTask;
 import org.openecomp.sdc.asdctool.impl.validator.utils.ReportManager;
 import org.openecomp.sdc.be.dao.DAOTitanStrategy;
@@ -15,7 +15,16 @@ import org.openecomp.sdc.be.dao.cassandra.CassandraClient;
 import org.openecomp.sdc.be.dao.jsongraph.TitanDao;
 import org.openecomp.sdc.be.dao.titan.TitanGraphClient;
 import org.openecomp.sdc.be.model.DerivedNodeTypeResolver;
-import org.openecomp.sdc.be.model.jsontitan.operations.*;
+import org.openecomp.sdc.be.model.jsontitan.operations.ArtifactsOperations;
+import org.openecomp.sdc.be.model.jsontitan.operations.ByToscaNameDerivedNodeTypeResolver;
+import org.openecomp.sdc.be.model.jsontitan.operations.CategoryOperation;
+import org.openecomp.sdc.be.model.jsontitan.operations.GroupsOperation;
+import org.openecomp.sdc.be.model.jsontitan.operations.NodeTemplateOperation;
+import org.openecomp.sdc.be.model.jsontitan.operations.NodeTypeOperation;
+import org.openecomp.sdc.be.model.jsontitan.operations.TopologyTemplateOperation;
+import org.openecomp.sdc.be.model.jsontitan.operations.ToscaDataOperation;
+import org.openecomp.sdc.be.model.jsontitan.operations.ToscaElementLifecycleOperation;
+import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
index 817ab15..b64fdde 100644 (file)
@@ -1,5 +1,8 @@
 package org.openecomp.sdc.asdctool.impl.validator.executers;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.openecomp.sdc.asdctool.impl.validator.tasks.ServiceValidationTask;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
@@ -7,8 +10,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import java.util.*;
-
 /**
  * Created by chaya on 7/4/2017.
  */
index 15f2573..04f014f 100644 (file)
@@ -1,6 +1,12 @@
 package org.openecomp.sdc.asdctool.impl.validator.executers;
 
-import fj.data.Either;
+import java.util.ArrayList;
+import java.util.EnumMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 import org.openecomp.sdc.asdctool.impl.validator.tasks.TopologyTemplateValidationTask;
 import org.openecomp.sdc.asdctool.impl.validator.utils.ReportManager;
 import org.openecomp.sdc.asdctool.impl.validator.utils.VertexResult;
@@ -12,12 +18,11 @@ import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
 import org.openecomp.sdc.be.model.jsontitan.operations.TopologyTemplateOperation;
-import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import java.util.*;
+import fj.data.Either;
 
 /**
  * Created by chaya on 7/3/2017.
index 8281d1f..519a900 100644 (file)
@@ -1,10 +1,5 @@
 package org.openecomp.sdc.asdctool.impl.validator.executers;
 
-import org.openecomp.sdc.asdctool.impl.validator.utils.ElementTypeEnum;
-import org.openecomp.sdc.be.model.Component;
-
-import java.util.List;
-
 /**
  * Created by chaya on 7/3/2017.
  */
index 913a36f..b4f333d 100644 (file)
@@ -1,12 +1,13 @@
 package org.openecomp.sdc.asdctool.impl.validator.executers;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.openecomp.sdc.asdctool.impl.validator.tasks.VfValidationTask;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
 import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import java.util.*;
-
 /**
  * Created by chaya on 7/3/2017.
  */
index faccd64..90d8f86 100644 (file)
@@ -1,6 +1,11 @@
 package org.openecomp.sdc.asdctool.impl.validator.tasks.artifacts;
 
-import fj.data.Either;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
 import org.openecomp.sdc.asdctool.impl.validator.utils.ReportManager;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
@@ -14,7 +19,7 @@ import org.openecomp.sdc.be.model.jsontitan.operations.TopologyTemplateOperation
 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import java.util.*;
+import fj.data.Either;
 
 /**
  * Created by chaya on 7/6/2017.
index c010148..c82a7b9 100644 (file)
@@ -1,10 +1,10 @@
 package org.openecomp.sdc.asdctool.impl.validator.tasks.artifacts;
 
-import org.openecomp.sdc.asdctool.impl.validator.utils.VertexResult;
-
 import java.util.HashSet;
 import java.util.Set;
 
+import org.openecomp.sdc.asdctool.impl.validator.utils.VertexResult;
+
 /**
  * Created by chaya on 7/25/2017.
  */
index 187359f..78045a5 100644 (file)
@@ -1,7 +1,13 @@
 package org.openecomp.sdc.asdctool.impl.validator.tasks.moduleJson;
 
-import fj.data.Either;
-import org.apache.cassandra.cql3.CQL3Type;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
 import org.openecomp.sdc.asdctool.impl.validator.tasks.ServiceValidationTask;
 import org.openecomp.sdc.asdctool.impl.validator.utils.ReportManager;
 import org.openecomp.sdc.asdctool.impl.validator.utils.VertexResult;
@@ -18,8 +24,7 @@ import org.openecomp.sdc.be.model.jsontitan.operations.TopologyTemplateOperation
 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import java.util.*;
-import java.util.stream.Collectors;
+import fj.data.Either;
 
 /**
  * Created by chaya on 7/18/2017.
index 245d38c..e6a09ee 100644 (file)
@@ -1,10 +1,10 @@
 package org.openecomp.sdc.asdctool.impl.validator.utils;
 
-import org.openecomp.sdc.asdctool.impl.validator.executers.VfValidatorExecuter;
-
 import java.util.ArrayList;
 import java.util.List;
 
+import org.openecomp.sdc.asdctool.impl.validator.executers.VfValidatorExecuter;
+
 /**
  * Created by chaya on 7/4/2017.
  */
index 64bea12..4a4af15 100644 (file)
@@ -1,14 +1,18 @@
 package org.openecomp.sdc.asdctool.impl.validator.utils;
 
-import org.apache.commons.lang.text.StrBuilder;
-import org.openecomp.sdc.asdctool.impl.validator.config.ValidationConfigManager;
-import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.nio.file.StandardOpenOption;
-import java.util.*;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+import org.apache.commons.lang.text.StrBuilder;
+import org.openecomp.sdc.asdctool.impl.validator.config.ValidationConfigManager;
+import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
 
 /**
  * Created by chaya on 7/5/2017.
index 8fad932..d1d1c26 100644 (file)
@@ -1,7 +1,6 @@
 package org.openecomp.sdc.asdctool.impl.validator.utils;
 
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.model.Component;
 
 /**
  * Created by chaya on 7/5/2017.
index e2691dc..21671a6 100644 (file)
@@ -1,5 +1,7 @@
 package org.openecomp.sdc.asdctool.migration.core;
 
+import java.util.List;
+
 import org.openecomp.sdc.asdctool.migration.core.execution.MigrationExecutionResult;
 import org.openecomp.sdc.asdctool.migration.core.execution.MigrationExecutorImpl;
 import org.openecomp.sdc.asdctool.migration.core.task.Migration;
@@ -9,8 +11,6 @@ import org.openecomp.sdc.asdctool.migration.service.SdcRepoService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.List;
-
 public class SdcMigrationTool {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(SdcMigrationTool.class);
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/AppTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/AppTest.java
deleted file mode 100644 (file)
index ae23b73..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest extends TestCase {
-       /**
-        * Create the test case
-        *
-        * @param testName
-        *            name of the test case
-        */
-       public AppTest(String testName) {
-               super(testName);
-       }
-
-       /**
-        * @return the suite of tests being tested
-        */
-       public static Test suite() {
-               return new TestSuite(AppTest.class);
-       }
-
-       /**
-        * Rigourous Test :-)
-        */
-       public void testApp() {
-               assertTrue(true);
-       }
-}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/servlets/EntryPointTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/servlets/EntryPointTest.java
new file mode 100644 (file)
index 0000000..c3f7874
--- /dev/null
@@ -0,0 +1,24 @@
+package org.openecomp.sdc.asdctool.servlets;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class EntryPointTest {
+
+       private EntryPoint createTestSubject() {
+               return new EntryPoint();
+       }
+
+       
+       @Test
+       public void testTest() throws Exception {
+               EntryPoint testSubject;
+               String result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.test();
+       }
+}
\ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/clean/AsdcComponentsCleanerTaskTest.java
new file mode 100644 (file)
index 0000000..be55cbd
--- /dev/null
@@ -0,0 +1,66 @@
+package org.openecomp.sdc.be.components.clean;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class AsdcComponentsCleanerTaskTest {
+
+       private AsdcComponentsCleanerTask createTestSubject() {
+               return new AsdcComponentsCleanerTask();
+       }
+
+       
+       @Test
+       public void testInit() throws Exception {
+               AsdcComponentsCleanerTask testSubject;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.init();
+       }
+
+       
+       @Test
+       public void testDestroy() throws Exception {
+               AsdcComponentsCleanerTask testSubject;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.destroy();
+       }
+
+       
+       @Test
+       public void testStartTask() throws Exception {
+               AsdcComponentsCleanerTask testSubject;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.startTask();
+       }
+
+       
+       @Test
+       public void testStopTask() throws Exception {
+               AsdcComponentsCleanerTask testSubject;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.stopTask();
+       }
+
+       
+
+
+       
+       @Test
+       public void testRun() throws Exception {
+               AsdcComponentsCleanerTask testSubject;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.run();
+       }
+}
\ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ArtifactTypesInfoTest.java
new file mode 100644 (file)
index 0000000..4010d9b
--- /dev/null
@@ -0,0 +1,60 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.model.ArtifactType;
+
+
+public class ArtifactTypesInfoTest {
+
+       private ArtifactTypesInfo createTestSubject() {
+               return new ArtifactTypesInfo();
+       }
+
+       
+       @Test
+       public void testGetArtifactTypes() throws Exception {
+               ArtifactTypesInfo testSubject;
+               List<ArtifactType> result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getArtifactTypes();
+       }
+
+       
+       @Test
+       public void testSetArtifactTypes() throws Exception {
+               ArtifactTypesInfo testSubject;
+               List<ArtifactType> artifactTypes = null;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.setArtifactTypes(artifactTypes);
+       }
+
+       
+       @Test
+       public void testGetHeatDefaultTimeout() throws Exception {
+               ArtifactTypesInfo testSubject;
+               Integer result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getHeatDefaultTimeout();
+       }
+
+       
+       @Test
+       public void testSetHeatDefaultTimeout() throws Exception {
+               ArtifactTypesInfo testSubject;
+               Integer heatDefaultTimeout = 0;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.setHeatDefaultTimeout(heatDefaultTimeout);
+       }
+}
\ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusListResponseTest.java
new file mode 100644 (file)
index 0000000..db4d735
--- /dev/null
@@ -0,0 +1,36 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+public class DistributionStatusListResponseTest {
+
+       private DistributionStatusListResponse createTestSubject() {
+               return new DistributionStatusListResponse();
+       }
+
+       
+       @Test
+       public void testGetDistributionStatusList() throws Exception {
+               DistributionStatusListResponse testSubject;
+               List<DistributionStatusInfo> result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getDistributionStatusList();
+       }
+
+       
+       @Test
+       public void testSetDistributionStatusList() throws Exception {
+               DistributionStatusListResponse testSubject;
+               List<DistributionStatusInfo> distribStatusInfoList = null;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.setDistributionStatusList(distribStatusInfoList);
+       }
+}
\ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/DistributionStatusOfServiceListResponceTest.java
new file mode 100644 (file)
index 0000000..830292a
--- /dev/null
@@ -0,0 +1,37 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class DistributionStatusOfServiceListResponceTest {
+
+       private DistributionStatusOfServiceListResponce createTestSubject() {
+               return new DistributionStatusOfServiceListResponce();
+       }
+
+       
+       @Test
+       public void testGetDistributionStatusOfServiceList() throws Exception {
+               DistributionStatusOfServiceListResponce testSubject;
+               List<DistributionStatusOfServiceInfo> result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getDistributionStatusOfServiceList();
+       }
+
+       
+       @Test
+       public void testSetDistributionStatusOfServiceList() throws Exception {
+               DistributionStatusOfServiceListResponce testSubject;
+               List<DistributionStatusOfServiceInfo> distribStatusOfServiceInfoList = null;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.setDistributionStatusOfServiceList(distribStatusOfServiceInfoList);
+       }
+}
\ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ServicesWrapperTest.java
new file mode 100644 (file)
index 0000000..085583a
--- /dev/null
@@ -0,0 +1,37 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class ServicesWrapperTest {
+
+       private ServicesWrapper createTestSubject() {
+               return new ServicesWrapper();
+       }
+
+       
+       @Test
+       public void testGetServices() throws Exception {
+               ServicesWrapper testSubject;
+               List<ServiceInfo> result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getServices();
+       }
+
+       
+       @Test
+       public void testSetServices() throws Exception {
+               ServicesWrapper testSubject;
+               List<ServiceInfo> services = null;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.setServices(services);
+       }
+}
\ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/info/ToscaNodeTypeInterfaceTest.java
new file mode 100644 (file)
index 0000000..80ae443
--- /dev/null
@@ -0,0 +1,37 @@
+package org.openecomp.sdc.be.info;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class ToscaNodeTypeInterfaceTest {
+
+       private ToscaNodeTypeInterface createTestSubject() {
+               return new ToscaNodeTypeInterface();
+       }
+
+       
+       @Test
+       public void testGetScripts() throws Exception {
+               ToscaNodeTypeInterface testSubject;
+               List<String> result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getScripts();
+       }
+
+       
+       @Test
+       public void testSetScripts() throws Exception {
+               ToscaNodeTypeInterface testSubject;
+               List<String> scripts = null;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.setScripts(scripts);
+       }
+}
\ No newline at end of file
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/switchover/detector/SwitchoverDetectorTest.java
new file mode 100644 (file)
index 0000000..f93819c
--- /dev/null
@@ -0,0 +1,38 @@
+package org.openecomp.sdc.be.switchover.detector;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+
+public class SwitchoverDetectorTest {
+
+       private SwitchoverDetector createTestSubject() {
+               return new SwitchoverDetector();
+       }
+
+       
+       @Test
+       public void testGetSiteMode() throws Exception {
+               SwitchoverDetector testSubject;
+               String result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getSiteMode();
+       }
+
+       
+       @Test
+       public void testSetSiteMode() throws Exception {
+               SwitchoverDetector testSubject;
+               String mode = "";
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.setSiteMode(mode);
+       }
+
+       
+
+}
\ No newline at end of file
index 81a2b41..414748a 100644 (file)
@@ -1,17 +1,13 @@
 package org.openecomp.sdc.be.dao;
 
-import javax.annotation.Generated;
-
 import org.junit.Test;
 
-
 public class AccountTest {
 
        private Account createTestSubject() {
                return new Account();
        }
 
-       
        @Test
        public void testGetName() throws Exception {
                Account testSubject;
@@ -22,7 +18,6 @@ public class AccountTest {
                result = testSubject.getName();
        }
 
-       
        @Test
        public void testSetName() throws Exception {
                Account testSubject;
@@ -33,7 +28,6 @@ public class AccountTest {
                testSubject.setName(name);
        }
 
-       
        @Test
        public void testGetEmail() throws Exception {
                Account testSubject;
@@ -44,7 +38,6 @@ public class AccountTest {
                result = testSubject.getEmail();
        }
 
-       
        @Test
        public void testSetEmail() throws Exception {
                Account testSubject;
@@ -55,7 +48,6 @@ public class AccountTest {
                testSubject.setEmail(email);
        }
 
-       
        @Test
        public void testEquals() throws Exception {
                Account testSubject;
@@ -67,7 +59,6 @@ public class AccountTest {
                result = testSubject.equals(other);
        }
 
-       
        @Test
        public void testHashCode() throws Exception {
                Account testSubject;
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/exception/ResourceDAOExceptionTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/exception/ResourceDAOExceptionTest.java
new file mode 100644 (file)
index 0000000..5424e71
--- /dev/null
@@ -0,0 +1,36 @@
+package org.openecomp.sdc.be.resources.exception;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+import org.openecomp.sdc.be.dao.api.ResourceUploadStatus;
+
+
+public class ResourceDAOExceptionTest {
+
+       private ResourceDAOException createTestSubject() {
+               return new ResourceDAOException("", null);
+       }
+
+       
+       @Test
+       public void testGetStatus() throws Exception {
+               ResourceDAOException testSubject;
+               ResourceUploadStatus result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getStatus();
+       }
+
+       
+       @Test
+       public void testSetStatus() throws Exception {
+               ResourceDAOException testSubject;
+               ResourceUploadStatus status = null;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.setStatus(status);
+       }
+}
\ No newline at end of file
diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/fe/GzipFilterTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/fe/GzipFilterTest.java
new file mode 100644 (file)
index 0000000..b91048d
--- /dev/null
@@ -0,0 +1,40 @@
+package org.openecomp.sdc.fe;
+
+import javax.annotation.Generated;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.junit.Test;
+
+
+public class GzipFilterTest {
+
+       private GzipFilter createTestSubject() {
+               return new GzipFilter();
+       }
+
+       
+
+       
+       @Test
+       public void testInit() throws Exception {
+               GzipFilter testSubject;
+               FilterConfig filterConfig = null;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.init(filterConfig);
+       }
+
+       
+       @Test
+       public void testDestroy() throws Exception {
+               GzipFilter testSubject;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.destroy();
+       }
+}
\ No newline at end of file
diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/fe/client/BackendClientTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/fe/client/BackendClientTest.java
new file mode 100644 (file)
index 0000000..d851899
--- /dev/null
@@ -0,0 +1,34 @@
+package org.openecomp.sdc.fe.client;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+import javax.net.ssl.HostnameVerifier;
+import javax.ws.rs.container.AsyncResponse;
+
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.eclipse.jetty.http.HttpGenerator.ResponseInfo;
+import org.junit.Test;
+import org.openecomp.sdc.fe.impl.HttpRequestInfo;
+
+
+public class BackendClientTest {
+
+       private BackendClient createTestSubject() {
+               return new BackendClient("", "", "");
+       }
+
+       
+       @Test
+       public void testGetHostnameVerifier() throws Exception {
+               BackendClient testSubject;
+               HostnameVerifier result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getHostnameVerifier();
+       }
+
+
+}
\ No newline at end of file
diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/fe/listen/MyObjectMapperProviderTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/fe/listen/MyObjectMapperProviderTest.java
new file mode 100644 (file)
index 0000000..a6885bf
--- /dev/null
@@ -0,0 +1,30 @@
+package org.openecomp.sdc.fe.listen;
+
+import javax.annotation.Generated;
+
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+
+public class MyObjectMapperProviderTest {
+
+       private MyObjectMapperProvider createTestSubject() {
+               return new MyObjectMapperProvider();
+       }
+
+       
+       @Test
+       public void testGetContext() throws Exception {
+               MyObjectMapperProvider testSubject;
+               Class<?> type = null;
+               ObjectMapper result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.getContext(type);
+       }
+
+       
+
+}
\ No newline at end of file
diff --git a/catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PortalServletTest.java b/catalog-fe/src/test/java/org/openecomp/sdc/fe/servlets/PortalServletTest.java
new file mode 100644 (file)
index 0000000..25a7c69
--- /dev/null
@@ -0,0 +1,35 @@
+package org.openecomp.sdc.fe.servlets;
+
+import java.util.List;
+
+import javax.annotation.Generated;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Test;
+import org.openecomp.sdc.common.impl.MutableHttpServletRequest;
+
+import io.netty.handler.codec.http2.Http2FrameReader.Configuration;
+
+
+public class PortalServletTest {
+
+       private PortalServlet createTestSubject() {
+               return new PortalServlet();
+       }
+
+       
+       @Test
+       public void testDoGet() throws Exception {
+               PortalServlet testSubject;
+               HttpServletRequest request = null;
+               HttpServletResponse response = null;
+
+               // default test
+               testSubject = createTestSubject();
+               testSubject.doGet(request, response);
+       }
+
+       
+       
+}
\ No newline at end of file
index 339023f..806c22a 100644 (file)
@@ -1,7 +1,14 @@
 package org.openecomp.sdc.be.model.jsontitan.operations;
 
-import fj.data.Either;
-import org.apache.cassandra.cql3.CQL3Type;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Rule;
@@ -21,10 +28,7 @@ import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
-import java.util.*;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import fj.data.Either;
 
 /**
  * Created by chaya on 6/12/2017.
diff --git a/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/ToscaTypeTest.java b/catalog-model/src/test/java/org/openecomp/sdc/be/model/tosca/ToscaTypeTest.java
new file mode 100644 (file)
index 0000000..0cea40f
--- /dev/null
@@ -0,0 +1,67 @@
+package org.openecomp.sdc.be.model.tosca;
+
+import javax.annotation.Generated;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+
+public class ToscaTypeTest {
+
+       private ToscaType createTestSubject() {
+               return  ToscaType.BOOLEAN;
+       }
+
+       
+       @Test
+       public void testFromYamlTypeName() throws Exception {
+               String typeName = "";
+               ToscaType result;
+
+               // test 1
+               typeName = null;
+               result = ToscaType.fromYamlTypeName(typeName);
+               Assert.assertEquals(null, result);
+
+               // test 2
+               typeName = "";
+               result = ToscaType.fromYamlTypeName(typeName);
+               Assert.assertEquals(null, result);
+       }
+
+       
+       @Test
+       public void testIsValidValue() throws Exception {
+               ToscaType testSubject;
+               String value = "";
+               boolean result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.isValidValue(value);
+       }
+
+
+       
+       @Test
+       public void testConvert() throws Exception {
+               ToscaType testSubject;
+               String value = "";
+               Object result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.convert(value);
+       }
+
+       
+       @Test
+       public void testToString() throws Exception {
+               ToscaType testSubject;
+               String result;
+
+               // default test
+               testSubject = createTestSubject();
+               result = testSubject.toString();
+       }
+}
\ No newline at end of file