summaryrefslogtreecommitdiffstats
path: root/catalog-dao/src/test/java
diff options
context:
space:
mode:
authorTomasz Golabek <tomasz.golabek@nokia.com>2019-06-25 14:30:23 +0200
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-07-14 11:55:00 +0000
commit5bb0a3b09bfe2c7f12af05af83223501c29a3f76 (patch)
tree9e7f3acdc5ad70111289b5c81baa4d9ffc86c222 /catalog-dao/src/test/java
parentff5db76f909826b332bcf294752646ed65ffaae5 (diff)
ComponentCache & ComponentCassandraDao removal
Also removed all classes uses these two. Change-Id: I6793c3c935ae61c5c65f70d3541c542edf188ab4 Issue-ID: SDC-2389 Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'catalog-dao/src/test/java')
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/ComponentCassandraDaoTest.java409
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ComponentCacheTableDescriptionTest.java92
-rw-r--r--catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ComponentCacheDataTest.java197
3 files changed, 0 insertions, 698 deletions
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/ComponentCassandraDaoTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/ComponentCassandraDaoTest.java
deleted file mode 100644
index 564ee5ae08..0000000000
--- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/ComponentCassandraDaoTest.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 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.be.dao.cassandra;
-
-import com.datastax.driver.core.Session;
-import com.datastax.driver.mapping.MappingManager;
-import com.datastax.driver.mapping.Result;
-import fj.data.Either;
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
-import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.resources.data.ComponentCacheData;
-
-import java.util.*;
-
-import static org.junit.Assert.assertTrue;
-
-public class ComponentCassandraDaoTest {
-
- @InjectMocks
- ComponentCassandraDao testSubject;
-
- @Mock
- CassandraClient clientMock;
-
- @Before
- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
- }
-
- @Test
- public void testInit() throws Exception {
-
- // default test
- testSubject.init();
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- testSubject.init();
- }
-
- @Test
- public void testInitException() throws Exception {
-
- // default test
- testSubject.init();
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either
- .right(CassandraOperationStatus.CLUSTER_NOT_CONNECTED);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- try {
- testSubject.init();
- } catch (Exception e) {
- assertTrue(e.getClass() == RuntimeException.class);
- }
- }
-
- @Test
- public void testGetComponents() throws Exception {
- List<String> ids;
- Either<List<ComponentCacheData>, ActionStatus> result;
-
- // test 1
- ids = null;
- result = testSubject.getComponents(ids);
-
-
- // test 2
- ids = new LinkedList<>();
- result = testSubject.getComponents(ids);
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Result<ComponentCacheData> value2 = Mockito.mock(Result.class);
- Mockito.when(componentCacheAccessorMock.getComponents(Mockito.any())).thenReturn(value2);
- List<ComponentCacheData> value3 = new LinkedList<>();
- value3.add(new ComponentCacheData("mock"));
- Mockito.when(value2.all()).thenReturn(value3);
- testSubject.init();
-
- ids.add("mock");
- testSubject.getComponents(ids);
- }
-
- @Test
- public void testGetComponentsNull() throws Exception {
- List<String> ids = new LinkedList<>();
- Either<List<ComponentCacheData>, ActionStatus> result;
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Mockito.when(componentCacheAccessorMock.getComponents(Mockito.any())).thenReturn(null);
- testSubject.init();
-
- ids.add("mock");
- testSubject.getComponents(ids);
- }
-
- @Test
- public void testGetComponentsException() throws Exception {
- List<String> ids = new LinkedList<>();
- Either<List<ComponentCacheData>, ActionStatus> result;
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Mockito.when(componentCacheAccessorMock.getComponents(Mockito.any())).thenThrow(RuntimeException.class);
- testSubject.init();
-
- ids.add("mock");
- testSubject.getComponents(ids);
- }
-
- @Test
- public void testGetAllComponentIdTimeAndType() throws Exception {
- Either<List<ComponentCacheData>, ActionStatus> result;
-
- // default test
- result = testSubject.getAllComponentIdTimeAndType();
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Result<ComponentCacheData> value2 = Mockito.mock(Result.class);
- Mockito.when(componentCacheAccessorMock.getAllComponentIdTimeAndType()).thenReturn(value2);
- List<ComponentCacheData> value3 = new LinkedList<>();
- value3.add(new ComponentCacheData("mock"));
- Mockito.when(value2.all()).thenReturn(value3);
- testSubject.init();
-
- testSubject.getAllComponentIdTimeAndType();
- }
-
- @Test
- public void testGetAllComponentIdTimeAndTypeNull() throws Exception {
- Either<List<ComponentCacheData>, ActionStatus> result;
-
- // default test
- result = testSubject.getAllComponentIdTimeAndType();
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Mockito.when(componentCacheAccessorMock.getAllComponentIdTimeAndType()).thenReturn(null);
- testSubject.init();
-
- result = testSubject.getAllComponentIdTimeAndType();
- }
-
- @Test
- public void testGetComponent() throws Exception {
- String id = "";
- Either<ComponentCacheData, ActionStatus> result;
-
- // test 1
- id = null;
- result = testSubject.getComponent(id);
- //Assert.assertEquals(null, result);
-
- // test 2
- id = "";
- result = testSubject.getComponent(id);
- //Assert.assertEquals(null, result);
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Result<ComponentCacheData> value2 = Mockito.mock(Result.class);
- Mockito.when(componentCacheAccessorMock.getComponent(Mockito.any())).thenReturn(value2);
- ComponentCacheData value3 = new ComponentCacheData();
- Mockito.when(value2.one()).thenReturn(value3);
- testSubject.init();
-
- result = testSubject.getComponent(id);
- }
-
- @Test
- public void testGetComponentNull1() throws Exception {
- String id = "";
- Either<ComponentCacheData, ActionStatus> result;
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Mockito.when(componentCacheAccessorMock.getComponent(Mockito.any())).thenReturn(null);
- testSubject.init();
-
- result = testSubject.getComponent(id);
- }
-
- @Test
- public void testGetComponentNull2() throws Exception {
- String id = "";
- Either<ComponentCacheData, ActionStatus> result;
-
- // test 1
- id = null;
- result = testSubject.getComponent(id);
- //Assert.assertEquals(null, result);
-
- // test 2
- id = "";
- result = testSubject.getComponent(id);
- //Assert.assertEquals(null, result);
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Result<ComponentCacheData> value2 = Mockito.mock(Result.class);
- Mockito.when(componentCacheAccessorMock.getComponent(Mockito.any())).thenReturn(value2);
- Mockito.when(value2.one()).thenReturn(null);
- testSubject.init();
-
- result = testSubject.getComponent(id);
- }
-
- @Test
- public void testSaveComponent() throws Exception {
- ComponentCacheData componentCacheData = null;
- CassandraOperationStatus result;
-
- // default test
- result = testSubject.saveComponent(componentCacheData);
- }
-
- @Test
- public void testIsTableEmpty() throws Exception {
- String tableName = "";
- Either<Boolean, CassandraOperationStatus> result;
-
- // default test
- result = testSubject.isTableEmpty(tableName);
- }
-
- @Test
- public void testGetComponents_1() throws Exception {
- Map<String, Long> idToTimestampMap = null;
- Either<ImmutablePair<List<ComponentCacheData>, Set<String>>, ActionStatus> result;
-
- // test 1
- idToTimestampMap = null;
- result = testSubject.getComponents(idToTimestampMap);
- //Assert.assertEquals(null, result);
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Result<ComponentCacheData> value2 = Mockito.mock(Result.class);
- Mockito.when(componentCacheAccessorMock.getComponents(Mockito.any(List.class))).thenReturn(value2);
- List<ComponentCacheData> value3 = new LinkedList<>();
- ComponentCacheData e = new ComponentCacheData("mock");
- Mockito.when(value2.all()).thenReturn(value3);
- testSubject.init();
-
- idToTimestampMap = new HashMap<>();
- idToTimestampMap.put("mock", 0L);
- e.setModificationTime(new Date());
- value3.add(e);
- result = testSubject.getComponents(idToTimestampMap);
- }
-
- @Test
- public void testGetComponents_1Null() throws Exception {
- Map<String, Long> idToTimestampMap = null;
- Either<ImmutablePair<List<ComponentCacheData>, Set<String>>, ActionStatus> result;
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Mockito.when(componentCacheAccessorMock.getComponents(Mockito.any(List.class))).thenReturn(null);
- testSubject.init();
-
- idToTimestampMap = new HashMap<>();
- idToTimestampMap.put("mock", 0L);
- result = testSubject.getComponents(idToTimestampMap);
- }
-
- @Test
- public void testGetComponents_1Exception() throws Exception {
- Map<String, Long> idToTimestampMap = null;
- Either<ImmutablePair<List<ComponentCacheData>, Set<String>>, ActionStatus> result;
-
- Session sessMock = Mockito.mock(Session.class);
- MappingManager mappMock = Mockito.mock(MappingManager.class);
- ComponentCacheAccessor componentCacheAccessorMock = Mockito.mock(ComponentCacheAccessor.class);
- ImmutablePair<Session, MappingManager> ipMock = ImmutablePair.of(sessMock, mappMock);
-
- Mockito.when(clientMock.isConnected()).thenReturn(true);
- Either<ImmutablePair<Session, MappingManager>, CassandraOperationStatus> value = Either.left(ipMock);
- Mockito.when(clientMock.connect(Mockito.any())).thenReturn(value);
- Mockito.when(mappMock.createAccessor(ComponentCacheAccessor.class)).thenReturn(componentCacheAccessorMock);
-
- Mockito.when(componentCacheAccessorMock.getComponents(Mockito.any(List.class))).thenThrow(RuntimeException.class);
- testSubject.init();
-
- idToTimestampMap = new HashMap<>();
- idToTimestampMap.put("mock", 0L);
- result = testSubject.getComponents(idToTimestampMap);
- }
-
- @Test
- public void testDeleteComponent() throws Exception {
- String id = "";
- CassandraOperationStatus result;
-
- // default test
- result = testSubject.deleteComponent(id);
- }
-}
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ComponentCacheTableDescriptionTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ComponentCacheTableDescriptionTest.java
deleted file mode 100644
index 4968bb6603..0000000000
--- a/catalog-dao/src/test/java/org/openecomp/sdc/be/dao/cassandra/schema/tables/ComponentCacheTableDescriptionTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 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.be.dao.cassandra.schema.tables;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang3.tuple.ImmutablePair;
-import org.junit.Test;
-
-import com.datastax.driver.core.DataType;
-
-
-public class ComponentCacheTableDescriptionTest {
-
- private ComponentCacheTableDescription createTestSubject() {
- return new ComponentCacheTableDescription();
- }
-
-
- @Test
- public void testPrimaryKeys() throws Exception {
- ComponentCacheTableDescription testSubject;
- List<ImmutablePair<String, DataType>> result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.primaryKeys();
- }
-
-
- @Test
- public void testGetColumnDescription() throws Exception {
- ComponentCacheTableDescription testSubject;
- Map<String, ImmutablePair<DataType, Boolean>> result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getColumnDescription();
- }
-
-
- @Test
- public void testGetKeyspace() throws Exception {
- ComponentCacheTableDescription testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getKeyspace();
- }
-
-
- @Test
- public void testGetTableName() throws Exception {
- ComponentCacheTableDescription testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getTableName();
- }
-
-
- @Test
- public void testClusteringKeys() throws Exception {
- ComponentCacheTableDescription testSubject;
- List<ImmutablePair<String, DataType>> result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.clusteringKeys();
- }
-}
diff --git a/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ComponentCacheDataTest.java b/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ComponentCacheDataTest.java
deleted file mode 100644
index 54bfa502b5..0000000000
--- a/catalog-dao/src/test/java/org/openecomp/sdc/be/resources/data/ComponentCacheDataTest.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 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.be.resources.data;
-
-import org.junit.Test;
-
-import java.nio.ByteBuffer;
-import java.util.Date;
-
-
-public class ComponentCacheDataTest {
-
- private ComponentCacheData createTestSubject() {
- return new ComponentCacheData();
- }
-
- @Test
- public void testCtor() throws Exception {
- new ComponentCacheData("mock");
- new ComponentCacheData("mock", new byte[0]);
- new ComponentCacheData("mock", new byte[0], new Date(), "mock", true, true);
- }
-
- @Test
- public void testGetDataAsArray() throws Exception {
- ComponentCacheData testSubject;
- byte[] result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getDataAsArray();
- }
-
-
- @Test
- public void testSetDataAsArray() throws Exception {
- ComponentCacheData testSubject;
- byte[] data = new byte[] { ' ' };
-
- // test 1
- testSubject = createTestSubject();
- data = null;
- testSubject.setDataAsArray(data);
-
- // test 2
- testSubject = createTestSubject();
- data = new byte[] { ' ' };
- testSubject.setDataAsArray(data);
- }
-
-
- @Test
- public void testGetData() throws Exception {
- ComponentCacheData testSubject ;
-
- testSubject = createTestSubject();
-
- testSubject.getData();
- }
-
- @Test
- public void testSetData() throws Exception {
- ComponentCacheData testSubject ;
-
- testSubject = createTestSubject();
-
- ByteBuffer data = ByteBuffer.allocate(0);
- testSubject.setData(data);
- }
-
- @Test
- public void testGetId() throws Exception {
- ComponentCacheData testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getId();
- }
-
-
- @Test
- public void testSetId() throws Exception {
- ComponentCacheData testSubject;
- String id = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setId(id);
- }
-
-
- @Test
- public void testGetModificationTime() throws Exception {
- ComponentCacheData testSubject;
- Date result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getModificationTime();
- }
-
-
- @Test
- public void testSetModificationTime() throws Exception {
- ComponentCacheData testSubject;
- Date modificationTime = null;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setModificationTime(modificationTime);
- }
-
-
- @Test
- public void testGetType() throws Exception {
- ComponentCacheData testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getType();
- }
-
-
- @Test
- public void testSetType() throws Exception {
- ComponentCacheData testSubject;
- String type = "";
-
- // default test
- testSubject = createTestSubject();
- testSubject.setType(type);
- }
-
-
- @Test
- public void testGetIsDirty() throws Exception {
- ComponentCacheData testSubject;
- boolean result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getIsDirty();
- }
-
-
- @Test
- public void testSetIsDirty() throws Exception {
- ComponentCacheData testSubject;
- boolean isDirty = false;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setIsDirty(isDirty);
- }
-
-
- @Test
- public void testGetIsZipped() throws Exception {
- ComponentCacheData testSubject;
- boolean result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getIsZipped();
- }
-
-
- @Test
- public void testSetIsZipped() throws Exception {
- ComponentCacheData testSubject;
- boolean isZipped = false;
-
- // default test
- testSubject = createTestSubject();
- testSubject.setIsZipped(isZipped);
- }
-}