[PORTAL-16 PORTAL-18] Widget ms; staging
[portal.git] / ecomp-portal-BE-common-test / src / main / java / org / openecomp / portalapp / portal / test / core / PopulateSampleTestData.java
index b04d200..8f99f44 100644 (file)
@@ -1,66 +1,66 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.core;\r
-\r
-import java.sql.Connection;\r
-import java.sql.SQLException;\r
-\r
-import javax.sql.DataSource;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.portalapp.portal.test.framework.ApplicationCommonContextTestSuite;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.core.io.ClassPathResource;\r
-import org.springframework.jdbc.datasource.DataSourceUtils;\r
-import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;\r
-\r
-public class PopulateSampleTestData extends ApplicationCommonContextTestSuite {\r
-\r
-       @Autowired\r
-       DataSource dataSource;\r
-\r
-       @Before\r
-       public void populateTestData() throws SQLException {\r
-\r
-               String sql = "PopulateTestData.sql";\r
-               createConnection(sql);\r
-       }\r
-\r
-       public void createConnection(String sql) {\r
-               Connection connection = null;\r
-               ResourceDatabasePopulator populator = new ResourceDatabasePopulator();\r
-               populator.addScript(new ClassPathResource(sql));\r
-               try {\r
-                       connection = DataSourceUtils.getConnection(dataSource);\r
-                       populator.populate(connection);\r
-               } finally {\r
-                       if (connection != null) {\r
-                               DataSourceUtils.releaseConnection(connection, dataSource);\r
-                       }\r
-               }\r
-       }\r
-\r
-       @Test\r
-       public void populateTest() {\r
-               assert (true);\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * 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.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.core;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import javax.sql.DataSource;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.portalapp.test.framework.ApplicationCommonContextTestSuite;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.jdbc.datasource.DataSourceUtils;
+import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
+
+public class PopulateSampleTestData extends ApplicationCommonContextTestSuite {
+
+       @Autowired
+       DataSource dataSource;
+
+       @Before
+       public void populateTestData() throws SQLException {
+
+               String sql = "PopulateTestData.sql";
+               createConnection(sql);
+       }
+
+       public void createConnection(String sql) {
+               Connection connection = null;
+               ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
+               populator.addScript(new ClassPathResource(sql));
+               try {
+                       connection = DataSourceUtils.getConnection(dataSource);
+                       populator.populate(connection);
+               } finally {
+                       if (connection != null) {
+                               DataSourceUtils.releaseConnection(connection, dataSource);
+                       }
+               }
+       }
+
+       @Test
+       public void populateTest() {
+               assert (true);
+       }
+
+}