junit.framework.Assert



API Populatity

180 Client projects

Project: junit

Package: junit.framework

Project alibaba/druid in file ...d.sql.visitor.ParameterizedOutputVisitorUtils.java (2012-03-31)
@@ -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);
Project alibaba/fastjson in file ...java.com.alibaba.json.test.bvt.SpecialKeyTest.java (2011-08-19)
@@ -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);
     }
 }
Project alibaba/fastjson in file ...st.java.com.alibaba.json.test.bvt.ref.TestRef.java (2011-08-15)
@@ -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));
         }