X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=sdnr%2Fwireless-transport%2Fcode-Carbon-SR1%2Fapps%2Fdlux%2Floader%2Fimpl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fdlux%2Floader%2FDluxLoaderIndexServletTest.java;fp=sdnr%2Fwireless-transport%2Fcode-Carbon-SR1%2Fapps%2Fdlux%2Floader%2Fimpl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fdlux%2Floader%2FDluxLoaderIndexServletTest.java;h=0000000000000000000000000000000000000000;hb=1c1e7f98416875f3ee78af9103865c32f95a82a0;hp=eb1c9055cbe5f4baa0ca20c82a6dba8df8b346cc;hpb=6a893bb0ae984d15076394d9225d4873ad953791;p=ccsdk%2Fapps.git diff --git a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/loader/impl/src/test/java/org/opendaylight/dlux/loader/DluxLoaderIndexServletTest.java b/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/loader/impl/src/test/java/org/opendaylight/dlux/loader/DluxLoaderIndexServletTest.java deleted file mode 100644 index eb1c9055..00000000 --- a/sdnr/wireless-transport/code-Carbon-SR1/apps/dlux/loader/impl/src/test/java/org/opendaylight/dlux/loader/DluxLoaderIndexServletTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.dlux.loader; - -import org.junit.Test; -import org.junit.Assert; -import org.opendaylight.dlux.loader.exception.DluxLoaderException; -import org.opendaylight.dlux.loader.implementation.DluxLoader; -import org.opendaylight.dlux.loader.implementation.DluxLoaderIndexServlet; - -import java.util.List; -import java.util.Properties; - - -public class DluxLoaderIndexServletTest { - - private DluxLoader dluxLoader = new DluxLoader(); - - @Test - public void testLoadModulePropertyFile() throws DluxLoaderException { - - DluxLoaderIndexServlet indexServlet = new DluxLoaderIndexServlet(dluxLoader); - Properties properties = indexServlet.getProp(); - String defineJS = properties.getProperty("defineJS"); - Assert.assertNotNull(defineJS); - Assert.assertTrue(defineJS.contains("'angular',")); - String requireJS = properties.getProperty("requireJS"); - Assert.assertNotNull(requireJS); - Assert.assertTrue(requireJS.contains("common/config/env.module")); - String angularJS = properties.getProperty("angularJS"); - Assert.assertNotNull(angularJS); - Assert.assertTrue(angularJS.contains("'ui.router',")); - } - - @Test - public void testLoadIndexHTML() throws DluxLoaderException { - DluxLoaderIndexServlet indexServlet = new DluxLoaderIndexServlet(dluxLoader); - List indexHTML = indexServlet.getIndexHTML(); - Properties properties = indexServlet.getProp(); - - String jsReplace = properties.getProperty("javascriptReplaceString"); - String cssReplace = properties.getProperty("cssReplaceString"); - - boolean containsJSReplace = false; - boolean containsCssReplace = false; - - for(String line : indexHTML) { - if(line.contains(jsReplace)) { - containsJSReplace = true; - } - - if(line.contains(cssReplace)) { - containsCssReplace = true; - } - } - - Assert.assertTrue(containsCssReplace); - Assert.assertTrue(containsJSReplace); - } - -}