aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribStatusEventTableDescTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribStatusEventTableDescTest.java')
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribStatusEventTableDescTest.java68
1 files changed, 26 insertions, 42 deletions
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribStatusEventTableDescTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribStatusEventTableDescTest.java
index 34529f2b22..036b86e0f5 100644
--- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribStatusEventTableDescTest.java
+++ b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/DistribStatusEventTableDescTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -21,46 +21,30 @@
package org.openecomp.sdc.be.dao.cassandra.schema.tables;
import com.datastax.driver.core.DataType;
-import mockit.Deencapsulation;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.junit.Test;
-import org.openecomp.sdc.be.dao.cassandra.schema.tables.DistribStatusEventTableDesc.DSEFieldsDescription;
-
-import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
+
+class DistribStatusEventTableDescTest {
+
+ private DistribStatusEventTableDesc createTestSubject() {
+ return new DistribStatusEventTableDesc();
+ }
+
+ @Test
+ void testUpdateColumnDistribDescription() throws Exception {
+ final DistribStatusEventTableDesc testSubject = createTestSubject();
+ final Map<String, ImmutablePair<DataType, Boolean>> columnDescription = testSubject.getColumnDescription();
+ Assertions.assertNotNull(columnDescription);
+ Assertions.assertEquals(10, columnDescription.size());
+ }
+
+ @Test
+ void testGetTableName() throws Exception {
+ final DistribStatusEventTableDesc testSubject = createTestSubject();
+ Assertions.assertEquals(AuditingTypesConstants.DISTRIBUTION_STATUS_EVENT_TYPE, testSubject.getTableName());
+ }
-public class DistribStatusEventTableDescTest {
-
- private DistribStatusEventTableDesc createTestSubject() {
- return new DistribStatusEventTableDesc();
- }
-
- @Test
- public void testUpdateColumnDistribDescription() throws Exception {
- DistribStatusEventTableDesc testSubject;
- Map<String, ImmutablePair<DataType, Boolean>> columns = new HashMap<>();
-
- // default test
- testSubject = createTestSubject();
- Deencapsulation.invoke(testSubject, "updateColumnDistribDescription", columns);
- }
-
- @Test
- public void testGetTableName() throws Exception {
- DistribStatusEventTableDesc testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getTableName();
- }
-
- @Test
- public void testDSEFieldsDescription() throws Exception {
- DSEFieldsDescription testSubject = DistribStatusEventTableDesc.DSEFieldsDescription.CONSUMER_ID;
-
- testSubject.getName();
- testSubject.getType();
- testSubject.isIndexed();
- }
}