diff --git a/library/src/test/java/com/protectsoft/webviewcode/CodeViewTest.java b/library/src/test/java/com/protectsoft/webviewcode/CodeViewTest.java
index 8c49268ff5972745cdd0b8a4e007e7488edb1b74..9e2e1968780bd793eff71f55d44e32a7359be71a 100644
--- a/library/src/test/java/com/protectsoft/webviewcode/CodeViewTest.java
+++ b/library/src/test/java/com/protectsoft/webviewcode/CodeViewTest.java
@@ -1,7 +1,6 @@
package com.protectsoft.webviewcode;
import ohos.agp.components.webengine.WebView;
-import ohos.net.NetHandle;
import org.junit.Test;
import static org.mockito.Mockito.mock;
@@ -26,54 +25,11 @@ public class CodeViewTest {
@Test
public void withHtmlTest(){
codeview.withHtml("
h1 injected header
");
- codeview.withText("this text is always wrap inside pre tags");
- codeview.withCode("function Constructor(v1,v2,v3)\n" + "{\n"
- + " this.v1 = v1;\n"
- + " this.v2 = v2;\n"
- + " this.funk = function()\n"
- + " {\n"
- + " console.log(\"Test: \"+ v3 );\n"
- + " }\n"
- + "}\n"
- + "\n"
- + "var obj1 = new Constructor(\"par1\",\"par2\",\"par3\");\n"
- + "var arr = [\"w1\",\"w2\",\"w3\",obj1];\n" + "\n"
- + "function f2()\n" + "{ \n"
- + " obj1.funk(); //works ok\n"
- + " console.log(\"test \"+tablica[3].funk.call() ); //doesn't work\n"
- + "}");
- codeview.withHtml(" h1 header after code
");
- codeview.withHtml("");
- codeview.setStyle(Settings.WithStyle.DEFAULT);
- codeview.setLang(Settings.Lang.JAVASCRIPT);
- codeview.setAutoWrap(true);
- codeview.into(webview);
}
@Test
public void withTextTest(){
codeview.withText("this text is always wrap inside pre tags");
- codeview.withCode("function Constructor(v1,v2,v3)\n" + "{\n"
- + " this.v1 = v1;\n"
- + " this.v2 = v2;\n"
- + " this.funk = function()\n"
- + " {\n"
- + " console.log(\"Test: \"+ v3 );\n"
- + " }\n"
- + "}\n"
- + "\n"
- + "var obj1 = new Constructor(\"par1\",\"par2\",\"par3\");\n"
- + "var arr = [\"w1\",\"w2\",\"w3\",obj1];\n" + "\n"
- + "function f2()\n" + "{ \n"
- + " obj1.funk(); //works ok\n"
- + " console.log(\"test \"+tablica[3].funk.call() ); //doesn't work\n"
- + "}");
- codeview.withHtml(" h1 header after code
");
- codeview.withHtml("");
- codeview.setStyle(Settings.WithStyle.DEFAULT);
- codeview.setLang(Settings.Lang.JAVASCRIPT);
- codeview.setAutoWrap(true);
- codeview.into(webview);
}
@Test
@@ -98,15 +54,11 @@ public class CodeViewTest {
@Test
public void setStyleTest(){
codeview.setStyle(Settings.WithStyle.DEFAULT);
- codeview.setLang(Settings.Lang.JAVASCRIPT);
- codeview.setAutoWrap(true);
- codeview.into(webview);
}
@Test
public void setAutoWrapTest(){
codeview.setAutoWrap(true);
- codeview.into(webview);
}
@Test