From 7446f23b3abc30d7c53f2eaa951742371c071171 Mon Sep 17 00:00:00 2001 From: Herbert Eiselt Date: Thu, 28 Feb 2019 15:23:42 +0100 Subject: UX extensions UX Maintenance client and further changes Change-Id: I7643661d17db5fc3d3f94b58cb42ed0be558c64f Issue-ID: SDNC-583 Signed-off-by: Herbert Eiselt --- sdnr/wt/odlux/apps/helpApp/pom.xml | 256 ++++++++++++--------- .../sdnr/wt/odlux/bundles/test/TestBundleRes.java | 46 ++++ .../odlux/apps/helpApp/src2/test/resources/test.js | 5 + 3 files changed, 203 insertions(+), 104 deletions(-) create mode 100644 sdnr/wt/odlux/apps/helpApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java create mode 100644 sdnr/wt/odlux/apps/helpApp/src2/test/resources/test.js (limited to 'sdnr/wt/odlux/apps/helpApp') diff --git a/sdnr/wt/odlux/apps/helpApp/pom.xml b/sdnr/wt/odlux/apps/helpApp/pom.xml index 1c1b99c87..5fd94f5fd 100644 --- a/sdnr/wt/odlux/apps/helpApp/pom.xml +++ b/sdnr/wt/odlux/apps/helpApp/pom.xml @@ -1,110 +1,158 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - org.onap.ccsdk.parent - odlparent - 1.2.1-SNAPSHOT - - - 4.0.0 - org.onap.ccsdk.features.sdnr.wt - sdnr-wt-odlux-app-helpApp - 0.4.1-SNAPSHOT - bundle - sdnr-wt-odlux-app-helpApp - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0 - - - - - ${project.groupId} - sdnr-wt-odlux-core-model - ${project.version} - - - - src2/main/java - - - maven-clean-plugin - 2.5 - - + + org.onap.ccsdk.parent + odlparent + 1.2.1-SNAPSHOT + + + 4.0.0 + org.onap.ccsdk.features.sdnr.wt + sdnr-wt-odlux-app-helpApp + 0.4.1-SNAPSHOT + bundle + sdnr-wt-odlux-app-helpApp + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + + + + + ${project.groupId} + sdnr-wt-odlux-core-model + ${project.version} + + + ${project.groupId} + sdnr-wt-odlux-core-provider + ${project.version} + test + + + junit + junit + test + + + + src2/main/java + + + maven-clean-plugin + + + + dist + false + + + node + false + + + node_modules + false + + + ../node_modules + false + + - dist + bin false - - - - - com.github.eirslett - frontend-maven-plugin - 1.8.1-SNAPSHOT - - - install node and yarn - - install-node-and-yarn - - - initialize - - v8.10.0 - v1.12.3 - - - - yarn build - - yarn - - - run build - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - true - - - org.onap.ccsdk.features.sdnr.wt.odlux.model.*,com.opensymphony.* - - - - - - - - dist - odlux - - - src2/main/resources - - - - - - highstreet repo - https://cloud-highstreet-technologies.com/mvn/ - - true - always - - - - \ No newline at end of file + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add-test-source + generate-test-sources + + add-test-source + + + + src2/test/java + + + + + + + com.github.eirslett + frontend-maven-plugin + 1.8.1-SNAPSHOT + + + install node and yarn + + install-node-and-yarn + + + initialize + + v8.10.0 + v1.12.3 + + + + yarn build + + yarn + + + run build + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + org.apache.felix + maven-bundle-plugin + true + + + org.onap.ccsdk.features.sdnr.wt.odlux.model.*,com.opensymphony.* + + + + + + + + dist + odlux + + + src2/main/resources + + + src2/test/resources + + + + + + highstreet repo + https://cloud-highstreet-technologies.com/mvn/ + + true + always + + + + diff --git a/sdnr/wt/odlux/apps/helpApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java b/sdnr/wt/odlux/apps/helpApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java new file mode 100644 index 000000000..d0fbe63c0 --- /dev/null +++ b/sdnr/wt/odlux/apps/helpApp/src2/test/java/org/onap/ccsdk/features/sdnr/wt/odlux/bundles/test/TestBundleRes.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH 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.onap.ccsdk.features.sdnr.wt.odlux.bundles.test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import org.junit.Test; +import org.onap.ccsdk.features.sdnr.wt.odlux.OdluxBundleLoaderImpl; +import org.onap.ccsdk.features.sdnr.wt.odlux.bundles.MyOdluxBundle; + +public class TestBundleRes { + + @Test + public void test() { + OdluxBundleLoaderImpl loader = OdluxBundleLoaderImpl.getInstance(); + MyOdluxBundle b = new MyOdluxBundle(); + b.setLoader(loader); + b.setIndex(0); + b.setBundleName("abc"); + b.initialize(); + assertTrue(loader.getNumberOfBundles()==1); + assertNotNull(b.getLoader()); + assertEquals("abc",b.getBundleName()); + assertTrue(b.hasResource("test.js")); + assertNotNull(b.getResourceFileContent("test.js")); + b.clean(); + assertTrue(loader.getNumberOfBundles()==0); + } + +} diff --git a/sdnr/wt/odlux/apps/helpApp/src2/test/resources/test.js b/sdnr/wt/odlux/apps/helpApp/src2/test/resources/test.js new file mode 100644 index 000000000..b47fdc39f --- /dev/null +++ b/sdnr/wt/odlux/apps/helpApp/src2/test/resources/test.js @@ -0,0 +1,5 @@ +asdac sad +as +d +sad + sadfa \ No newline at end of file -- cgit 1.2.3-korg