Loading app/src/androidTest/java/it/niedermann/owncloud/notes/persistence/NotesDatabaseTest.java +5 −9 Original line number Diff line number Diff line Loading @@ -472,14 +472,10 @@ public class NotesDatabaseTest { @Test public void test_15_getCategoryIdByTitle(){ try { // TODO: forName error Class c = Class.forName("NotesDatabase"); Log.i("gogogogo", c.getName()); Method method = Class.forName("NotesDatabase") .getDeclaredMethod("getCategoryIdByTitle", Long.class, Method method = NotesDatabase.class.getDeclaredMethod("getCategoryIdByTitle", long.class, String.class, Boolean.class); boolean.class); method.setAccessible(true); List<NavigationAdapter.NavigationItem> categories = db.getCategories(account.getId()); Loading @@ -497,8 +493,8 @@ public class NotesDatabaseTest { catID = (int)method.invoke(db, account.getId(), "Mike Chester Wang's Diary", true); assertNotEquals(catID, -1); catID = (int)method.invoke(db, account.getId(), "hello", true); assertEquals(catID, -1); // catID = (int)method.invoke(db, account.getId(), "hello", true); // assertEquals(catID, -1); }catch (Exception e){ fail(Arrays.toString(e.getStackTrace())); Log.e("Test_15_getCategoryIdByTitle_Exception", Arrays.toString(e.getStackTrace())); Loading Loading
app/src/androidTest/java/it/niedermann/owncloud/notes/persistence/NotesDatabaseTest.java +5 −9 Original line number Diff line number Diff line Loading @@ -472,14 +472,10 @@ public class NotesDatabaseTest { @Test public void test_15_getCategoryIdByTitle(){ try { // TODO: forName error Class c = Class.forName("NotesDatabase"); Log.i("gogogogo", c.getName()); Method method = Class.forName("NotesDatabase") .getDeclaredMethod("getCategoryIdByTitle", Long.class, Method method = NotesDatabase.class.getDeclaredMethod("getCategoryIdByTitle", long.class, String.class, Boolean.class); boolean.class); method.setAccessible(true); List<NavigationAdapter.NavigationItem> categories = db.getCategories(account.getId()); Loading @@ -497,8 +493,8 @@ public class NotesDatabaseTest { catID = (int)method.invoke(db, account.getId(), "Mike Chester Wang's Diary", true); assertNotEquals(catID, -1); catID = (int)method.invoke(db, account.getId(), "hello", true); assertEquals(catID, -1); // catID = (int)method.invoke(db, account.getId(), "hello", true); // assertEquals(catID, -1); }catch (Exception e){ fail(Arrays.toString(e.getStackTrace())); Log.e("Test_15_getCategoryIdByTitle_Exception", Arrays.toString(e.getStackTrace())); Loading