summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikayla Ray <mikayla@livioconnect.com>2015-05-13 14:59:09 -0400
committerMikayla Ray <mikayla@livioconnect.com>2015-05-13 14:59:09 -0400
commit5cd2992a918f3f2a4546b8e69a92cbdfbd3f0da1 (patch)
treeb355665d48d2919b0d2ac052c1cec6802c8c9203
parent6da3ffb46bd5c8ec2e4bf35e9b32e9a99bbab6c5 (diff)
downloadsdl_android-5cd2992a918f3f2a4546b8e69a92cbdfbd3f0da1.tar.gz
Refactoring issue fixes and added documentation to DebugToolTests class.
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java4
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/util/DebugToolTests.java74
2 files changed, 17 insertions, 61 deletions
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java
index 4eeece263..33c4ab53c 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java
@@ -15,8 +15,8 @@ import com.smartdevicelink.proxy.rpc.SendLocation;
import com.smartdevicelink.proxy.rpc.enums.ImageType;
import com.smartdevicelink.test.BaseRpcTests;
import com.smartdevicelink.test.json.rpc.JsonFileReader;
-import com.smartdevicelink.test.utils.JsonUtils;
-import com.smartdevicelink.test.utils.Validator;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Validator;
public class SendLocationTests extends BaseRpcTests {
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/util/DebugToolTests.java b/sdl_android_tests/src/com/smartdevicelink/test/util/DebugToolTests.java
index fbd60276d..d174c22ba 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/util/DebugToolTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/util/DebugToolTests.java
@@ -4,68 +4,24 @@ import junit.framework.TestCase;
import com.smartdevicelink.util.DebugTool;
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.util.DebugTool}
+ */
public class DebugToolTests extends TestCase {
- // Cannot test logging methods
-
- public void testToolMethods () {
-
-// MockConsole mc1 = new MockConsole();
-// MockConsole mc2 = new MockConsole();
-// MockConsole mc3 = new MockConsole();
-
- // Test -- enableDebugTool()
+ /**
+ * This is a unit test for the following methods :
+ * {@link com.smartdevicelink.util.DebugTool#enableDebugTool()}
+ * {@link com.smartdevicelink.util.DebugTool#disableDebugTool()}
+ * {@link com.smartdevicelink.util.DebugTool#isDebugEnabled()}
+ */
+ public void testDebugEnableMethods () {
DebugTool.enableDebugTool();
assertTrue("Value should be true.", DebugTool.isDebugEnabled());
-
- // Test -- disableDebugTool()
DebugTool.disableDebugTool();
- assertFalse("Value should be false.", DebugTool.isDebugEnabled());
-
-// Can't test protected static field --
-// // -> Uses reflection <-
-// try {
-//
-// // Test console methods
-// DebugTool.addConsole(mc1);
-// DebugTool.addConsole(mc2);
-// DebugTool.addConsole(mc3);
-//
-// Vector<IConsole> testList = new Vector<IConsole>();
-// testList.add(mc1);
-// testList.add(mc2);
-// testList.add(mc3);
-//
-// // >>>>> HERE
-// Field field = (DebugTool.class).getDeclaredField("isTransportEnabled");
-// // <<<<<
-//
-// assertEquals("Values should match.", testList, field);
-//
-// DebugTool.removeConsole(mc3);
-// testList.removeElement(mc3);
-//
-// // Need to update field-get here?
-// assertEquals("Values should match.", testList, field);
-//
-// DebugTool.clearConsoles();
-// testList = new Vector<IConsole>();
-//
-// assertEquals("Values should match.", testList, field);
-//
-// } catch (NoSuchFieldException e) {
-// fail("Could not test private field, doesn't exist?");
-// }
+ assertFalse("Value should be false.", DebugTool.isDebugEnabled());
}
-}
-
-//class MockConsole implements IConsole {
-//
-// public MockConsole (String n) {}
-// @Override public void logInfo(String msg) { }
-// @Override public void logError(String msg) { }
-// @Override public void logError(String msg, Throwable ex) { }
-// @Override public void logRPCSend(String rpcMsg) { }
-// @Override public void logRPCReceive(String rpcMsg) { }
-//
-//} \ No newline at end of file
+
+ // NOTE : No testing can currently be done for the logging methods.
+} \ No newline at end of file