[Android] @Test markup, and remove impossible test

Geoffrey Métais git at videolan.org
Wed Jun 3 11:20:31 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jun  2 15:37:00 2015 +0200| [440dcc52619871a734c34f527b06ced118e962d7] | committer: Geoffrey Métais

@Test markup, and remove impossible test

TextUtils class is part of Android framework and mocking is not ready

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=440dcc52619871a734c34f527b06ced118e962d7
---

 .../test/org/videolan/vlc/util/StringsTest.java    |   43 +++++++++++---------
 1 file changed, 24 insertions(+), 19 deletions(-)

diff --git a/vlc-android/test/org/videolan/vlc/util/StringsTest.java b/vlc-android/test/org/videolan/vlc/util/StringsTest.java
index 83593b8..f110a41 100644
--- a/vlc-android/test/org/videolan/vlc/util/StringsTest.java
+++ b/vlc-android/test/org/videolan/vlc/util/StringsTest.java
@@ -1,10 +1,12 @@
 package org.videolan.vlc.util;
 
+import org.junit.Test;
+
 import static org.junit.Assert.*;
 
 public class StringsTest {
 
-
+    @Test
     public void testGetName(){
         String path = "/home/folder/file.txt";
         assertEquals("", Strings.getName(null));
@@ -12,23 +14,26 @@ public class StringsTest {
         assertEquals("file.txt", Strings.getName(path));
     }
 
-    public void testGetParent() {
-        String result = Strings.getParent("");
-        assertEquals("", result);
-
-        result = Strings.getParent("/");
-        assertEquals("/", result);
-
-        result = Strings.getParent("/folder");
-        assertEquals("/", result);
+    //TextUtils mock is not ready :/
+//    @Test
+//    public void testGetParent() {
+//        String result = Strings.getParent("");
+//        assertEquals("", result);
+//
+//        result = Strings.getParent("/");
+//        assertEquals("/", result);
+//
+//        result = Strings.getParent("/folder");
+//        assertEquals("/", result);
+//
+//        result = Strings.getParent("/folder/");
+//        assertEquals("/", result);
+//
+//        result = Strings.getParent("/folder/sub");
+//        assertEquals("/folder", result);
+//
+//        result = Strings.getParent("/folder/sub/");
+//        assertEquals("/folder", result);
+//    }
 
-        result = Strings.getParent("/folder/");
-        assertEquals("/", result);
-
-        result = Strings.getParent("/folder/sub");
-        assertEquals("/folder", result);
-
-        result = Strings.getParent("/folder/sub/");
-        assertEquals("/folder", result);
-    }
 }
\ No newline at end of file



More information about the Android mailing list