Add collaboration feature
[sdc.git] / openecomp-be / lib / openecomp-core-lib / openecomp-nosqldb-lib / openecomp-nosqldb-core / src / test / java / org / openecomp / core / nosqldb / NoSqlDbTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.core.nosqldb;
22
23 import org.openecomp.core.nosqldb.api.NoSqlDb;
24
25
26 public class NoSqlDbTest {
27
28   private NoSqlDb noSqlDb;
29 /*
30
31   @Test
32   public void testNoSqlDbFactoryFactoryInit() {
33     this.noSqlDb = NoSqlDbFactory.getInstance().createInterface();
34     Assert.assertNotNull(this.noSqlDb);
35     Assert.assertEquals(this.noSqlDb.getClass().getName(),
36         "org.openecomp.core.nosqldb.impl.cassandra.CassandraNoSqlDbImpl");
37   }
38
39   @Test(dependsOnMethods = {"testNoSqlDbFactoryFactoryInit"})
40   public void testCreateTable() {
41     this.noSqlDb.execute("test.drop", null);
42     this.noSqlDb.execute("test.create", null);
43   }
44
45   @Test(dependsOnMethods = {"testCreateTable"})
46   public void testInsertTable() {
47     this.noSqlDb
48         .insert("test", new String[]{"name", "value"}, new String[]{"TestName", "testValue"});
49     this.noSqlDb.execute("test.insert", new String[]{"TestName2", "testValue2"});
50   }
51
52   @Test(dependsOnMethods = {"testInsertTable"})
53   public void gettestSelectTable() {
54     ResultSet result = this.noSqlDb.execute("test.select.all", null);
55     List<Row> rows = result.all();
56     Assert.assertEquals(rows.size(), 2);
57     for (Row row : rows) {
58       System.out.format("%s %s\n", row.getString("name"), row.getString("value"));
59     }
60   }
61
62   */
63 }