Skip to content

Commit

Permalink
test queryJSON calls with null params
Browse files Browse the repository at this point in the history
  • Loading branch information
maxme committed Sep 29, 2015
1 parent 181cebb commit 13bb8af
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.wordpress.android.util;

import android.test.InstrumentationTestCase;

import org.json.JSONArray;
import org.json.JSONObject;

public class JSONUtilsTest extends InstrumentationTestCase {
public void testQueryJSONNullSource1() {
JSONUtils.queryJSON((JSONObject) null, "", "");
}

public void testQueryJSONNullSource2() {
JSONUtils.queryJSON((JSONArray) null, "", "");
}

public void testQueryJSONNullQuery1() {
JSONUtils.queryJSON(new JSONObject(), null, "");
}

public void testQueryJSONNullQuery2() {
JSONUtils.queryJSON(new JSONArray(), null, "");
}

public void testQueryJSONNullReturnValue1() {
JSONUtils.queryJSON(new JSONObject(), "", null);
}

public void testQueryJSONNullReturnValue2() {
JSONUtils.queryJSON(new JSONArray(), "", null);
}
}

0 comments on commit 13bb8af

Please sign in to comment.