junit.framework.Assert



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));
         }
Project junit-team/junit in file ...2370bea48fda/junit.tests.runner.LoadedFromJar.java (2004-09-09)
@@ -3,7 +3,7 @@ package junit.tests.runner;
 /**
  * Test class used in TestTestCaseClassLoader
  */
-import junit.framework.*;
+import junit.framework.Assert;
 
 public class LoadedFromJar extends Assert {
 	public void verify() {
Project JetBrains/intellij-community in file ...m.intellij.psi.impl.file.impl.FileManagerImpl.java (2009-04-01)
@@ -8,6 +8,7 @@ import com.intellij.lang.LanguageParserDefinitions;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.Document;
+import com.intellij.openapi.extensions.Extensions;
 import com.intellij.openapi.fileEditor.FileDocumentManager;
 import com.intellij.openapi.fileEditor.FileDocumentManagerAdapter;
 import com.intellij.openapi.fileTypes.*;
@@ -20,7 +21,6 @@ import com.intellij.openapi.roots.ex.ProjectRootManagerEx;
 import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.vfs.*;
 import com.intellij.openapi.vfs.impl.BulkVirtualFileListenerAdapter;
-import com.intellij.openapi.extensions.Extensions;
 import com.intellij.psi.*;
 import com.intellij.psi.impl.PsiFileEx;
 import com.intellij.psi.impl.PsiManagerImpl;
@@ -33,6 +33,7 @@ import com.intellij.util.ConcurrencyUtil;
 import com.intellij.util.containers.ConcurrentHashMap;
 import com.intellij.util.containers.ConcurrentWeakValueHashMap;
 import com.intellij.util.messages.MessageBusConnection;
+import junit.framework.Assert;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -205,7 +206,7 @@ public class FileManagerImpl implements FileManager {
       LOG.assertTrue(vFile.isValid());
       PsiFile psiFile1 = findFile(vFile);
       if (psiFile1 != null && fileViewProvider != null) { // might get collected
-        LOG.assertTrue(psiFile1.getClass().equals(fileViewProvider.getPsi(fileViewProvider.getBaseLanguage()).getClass()));
+        Assert.assertEquals(psiFile1.getClass(), fileViewProvider.getPsi(fileViewProvider.getBaseLanguage()).getClass());
       }
     }
 
Project alibaba/druid in file ...rc.test.java.com.alibaba.druid.bvt.pool.Case3.java (2011-07-14)
@@ -4,6 +4,7 @@ import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.Statement;
 
+import junit.framework.Assert;
 import junit.framework.TestCase;
 
 import com.alibaba.druid.pool.DruidDataSource;
@@ -27,6 +28,9 @@ public class Case3 extends TestCase {
         rs.next();
 
         conn.close();
+        
+        Assert.assertEquals(true, stmt.isClosed());
+        Assert.assertEquals(true, rs.isClosed());
 
         dataSource.close();
     }