JSONObject actualJsonObj = (JSONObject) jsonParser.parse(actualJsonString);
- System.out.println("Output : " + actualJsonString);
+ // System.out.println("Output : " + actualJsonString);
Assert.assertTrue(actualJsonObj.get("globalColorScheme") != null);
Assert.assertTrue((actualJsonObj.get("globalColorScheme").toString()).equals("zappo"));
JSONObject jsonSeq = jsonIter.next();
Assert.assertTrue(jsonSeq != null);
- Assert.assertTrue(jsonSeq.get("name") != null);
- Assert.assertTrue((jsonSeq.get("name").toString())
+ Assert.assertTrue("'name' cannot be null!",
+ jsonSeq.get("name") != null);
+ Assert.assertTrue("Expected name mismatched!",
+ (jsonSeq.get("name").toString())
.equals("name/1-26"));
- Assert.assertTrue(jsonSeq.get("seq") != null);
- Assert.assertTrue((jsonSeq.get("seq").toString())
+ Assert.assertTrue("'seq' cannot be null!", jsonSeq.get("seq") != null);
+ Assert.assertTrue("Expected sequence mismatched!", (jsonSeq
+ .get("seq").toString())
.equals("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
- Assert.assertTrue(jsonSeq.get("id") != null);
- Assert.assertTrue((jsonSeq.get("id").toString()).equals("1"));
+ Assert.assertTrue("'id' cannot be null!", jsonSeq.get("id") != null);
+ Assert.assertTrue("Expected id mismatched!",
+ (jsonSeq.get("id").toString()).equals("1"));
- Assert.assertTrue(jsonSeq.get("start") != null);
- Assert.assertTrue((jsonSeq.get("start").toString()).equals("1"));
+ Assert.assertTrue("'start' cannot be null!",
+ jsonSeq.get("start") != null);
+ Assert.assertTrue("Expected start mismatched!",
+ (jsonSeq.get("start").toString()).equals("1"));
- Assert.assertTrue(jsonSeq.get("end") != null);
- Assert.assertTrue((jsonSeq.get("end").toString()).equals("26"));
-
- Assert.assertTrue(jsonSeq.get("features") != null);
- Assert.assertTrue(jsonSeq.get("features").toString().equals("[]"));
+ Assert.assertTrue("'end' cannot be null!", jsonSeq.get("end") != null);
+ Assert.assertTrue("Expected end mismatched!",
+ (jsonSeq.get("end").toString()).equals("26"));
+ Assert.assertTrue("'features' cannot be null!",
+ jsonSeq.get("features") != null);
+ Assert.assertTrue("Expected features mismatched!",
+ jsonSeq.get("features").toString().equals("[]"));
} catch (IOException e)
{