1K | ➜ org.junit.Assert (snippets) |
---|---|
52 | ➜ org.testng.Assert (snippets) |
27 | ➜ org.junit.Assert.assertEquals-s (snippets) |
69 | org.junit.Test |
---|---|
40 | org.jetbrains.jet.j2k.JetTestCaseBase |
21 | junit.framework.TestCase |
@@ -2,8 +2,6 @@ package com.alibaba.druid.sql.visitor; import java.util.List; -import junit.framework.Assert; - import com.alibaba.druid.sql.ast.SQLExpr; import com.alibaba.druid.sql.ast.SQLStatement; import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; @@ -27,8 +25,6 @@ public class ParameterizedOutputVisitorUtils { List<SQLStatement> statementList = parser.parseStatementList(); SQLStatement statemen = statementList.get(0); - Assert.assertEquals(1, statementList.size()); - StringBuilder out = new StringBuilder(); SQLASTOutputVisitor visitor = createParameterizedOutputVisitor(out, dbType); statemen.accept(visitor);
@@ -3,6 +3,7 @@ package com.alibaba.json.test.bvt; import java.util.HashMap; import java.util.Map; +import junit.framework.Assert; import junit.framework.TestCase; import com.alibaba.fastjson.JSON; @@ -19,5 +20,6 @@ public class SpecialKeyTest extends TestCase { System.out.println(text); Map<Integer, Object> map2 = JSON.parseObject(text, new TypeReference<Map<Integer, Object>>() {}); + Assert.assertEquals(map, map2); } }
@@ -3,6 +3,7 @@ package com.alibaba.json.test.bvt.ref; import java.util.ArrayList; import java.util.Collection; +import junit.framework.Assert; import junit.framework.TestCase; import com.alibaba.fastjson.JSON; @@ -13,7 +14,7 @@ public class TestRef extends TestCase { public void test_ref() throws Exception { Department tech = new Department(1, "技术部"); tech.setRoot(tech); - + { Department pt = new Department(2, "平台技术部"); pt.setParent(tech); @@ -36,13 +37,14 @@ public class TestRef extends TestCase { { //JSON.toJSONString(tech); } - + { String prettyText = JSON.toJSONString(tech, SerializerFeature.PrettyFormat); System.out.println(prettyText); - + String text = JSON.toJSONString(tech); Department dept = JSON.parseObject(text, Department.class); + Assert.assertTrue(dept == dept.getRoot()); System.out.println(JSON.toJSONString(dept, SerializerFeature.PrettyFormat)); }