package com.intuit.tank.vm.common.util; /* * #%L * Intuit Tank Api * %% * Copyright (C) 2011 - 2015 Intuit Inc. * %% * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * #L% */ import java.util.HashMap; import java.util.Map; import org.json.JSONObject; import org.junit.*; import com.intuit.tank.vm.common.util.JSONBuilder; import static org.junit.Assert.*; /** * The class <code>JSONBuilderCpTest</code> contains tests for the class <code>{@link JSONBuilder}</code>. * * @generatedBy CodePro at 9/3/14 3:44 PM */ public class JSONBuilderCpTest { /** * Run the JSONBuilder() constructor test. * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testJSONBuilder_1() throws Exception { JSONBuilder result = new JSONBuilder(); assertNotNull(result); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_1() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_2() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_3() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_4() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_5() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_6() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_7() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_8() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_9() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_10() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_11() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_12() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_13() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_14() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_15() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the void add(String,String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testAdd_16() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String keySequence = ""; String value = ""; fixture.add(keySequence, value); } /** * Run the JSONObject getJson() method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testGetJson_1() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); JSONObject result = fixture.getJson(); assertNotNull(result); assertEquals("{}", result.toString()); assertEquals(0, result.length()); assertEquals(null, result.names()); } /** * Run the String getValue(String) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testGetValue_1() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String key = ""; String result = fixture.getValue(key); assertEquals(null, result); } /** * Run the void main(String[]) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testMain_1() throws Exception { String[] args = new String[] {}; JSONBuilder.main(args); } /** * Run the String toJsonString() method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testToJsonString_1() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String result = fixture.toJsonString(); assertEquals("{}", result); } /** * Run the String toJsonString(int) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testToJsonString_2() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); int indent = 1; String result = fixture.toJsonString(indent); assertEquals("{}", result); } /** * Run the String toJsonString(int) method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testToJsonString_3() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); int indent = 1; String result = fixture.toJsonString(indent); assertEquals("{}", result); } /** * Run the String toString() method test. * * @throws Exception * * @generatedBy CodePro at 9/3/14 3:44 PM */ @Test public void testToString_1() throws Exception { JSONBuilder fixture = new JSONBuilder(); fixture.json = new JSONObject(); fixture.valueMap = new HashMap<String,String>(); String result = fixture.toString(); assertEquals("{}", result); } }