abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ckopp...@apache.org
Subject svn commit: r944745 - in /abdera/java/trunk/extensions: features/src/test/java/org/apache/abdera/test/ext/features/ main/src/test/java/org/apache/abdera/test/ext/bidi/ main/src/test/java/org/apache/abdera/test/ext/history/ main/src/test/java/org/apache...
Date Sun, 16 May 2010 00:29:57 GMT
Author: ckoppelt
Date: Sun May 16 00:29:56 2010
New Revision: 944745

URL: http://svn.apache.org/viewvc?rev=944745&view=rev
Log:
replaced all occurences of 'extends Assert' with static imports

Modified:
    abdera/java/trunk/extensions/features/src/test/java/org/apache/abdera/test/ext/features/FeatureTest.java
    abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java
    abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java
    abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/license/LicenseTest.java
    abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java
    abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/ext/media/MediaTest.java
    abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/model/TestSelectNodes.java
    abdera/java/trunk/extensions/rss/src/test/java/org/apache/abdera/test/ext/rss/RssTest.java
    abdera/java/trunk/extensions/serializer/src/test/java/org/apache/abdera/test/ext/serializer/SerializerTest.java
    abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/ext/sharing/SharingTest.java

Modified: abdera/java/trunk/extensions/features/src/test/java/org/apache/abdera/test/ext/features/FeatureTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/features/src/test/java/org/apache/abdera/test/ext/features/FeatureTest.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/features/src/test/java/org/apache/abdera/test/ext/features/FeatureTest.java
(original)
+++ abdera/java/trunk/extensions/features/src/test/java/org/apache/abdera/test/ext/features/FeatureTest.java
Sun May 16 00:29:56 2010
@@ -17,7 +17,9 @@
 */
 package org.apache.abdera.test.ext.features;
 
-import junit.framework.Assert;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.ext.features.AcceptSelector;
@@ -34,7 +36,7 @@ import org.apache.abdera.model.Service;
 import org.apache.abdera.model.Workspace;
 import org.junit.Test;
 
-public class FeatureTest extends Assert {
+public class FeatureTest {
 
   @Test
   public void testFeaturesDocument() throws Exception {

Modified: abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java
(original)
+++ abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/bidi/BidiTest.java
Sun May 16 00:29:56 2010
@@ -17,7 +17,8 @@
 */
 package org.apache.abdera.test.ext.bidi;
 
-import junit.framework.Assert;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.ext.bidi.BidiHelper;
@@ -26,7 +27,7 @@ import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
 import org.junit.Test;
 
-public class BidiTest extends Assert {
+public class BidiTest {
 
   @Test
   public void testBidi() throws Exception {

Modified: abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java
(original)
+++ abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/history/FeedPagingTest.java
Sun May 16 00:29:56 2010
@@ -17,16 +17,18 @@
 */
 package org.apache.abdera.test.ext.history;
 
-import javax.xml.namespace.QName;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
-import junit.framework.Assert;
+import javax.xml.namespace.QName;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.ext.history.FeedPagingHelper;
 import org.apache.abdera.model.Feed;
 import org.junit.Test;
 
-public class FeedPagingTest extends Assert {
+public class FeedPagingTest {
 
   @Test
   public void testHistory() throws Exception {

Modified: abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/license/LicenseTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/license/LicenseTest.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/license/LicenseTest.java
(original)
+++ abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/license/LicenseTest.java
Sun May 16 00:29:56 2010
@@ -17,7 +17,9 @@
 */
 package org.apache.abdera.test.ext.license;
 
-import junit.framework.Assert;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.ext.license.LicenseHelper;
@@ -25,7 +27,7 @@ import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
 import org.junit.Test;
 
-public class LicenseTest extends Assert {
+public class LicenseTest {
 
   @Test
   public void testLicense() throws Exception {

Modified: abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java
(original)
+++ abdera/java/trunk/extensions/main/src/test/java/org/apache/abdera/test/ext/thread/ThreadTest.java
Sun May 16 00:29:56 2010
@@ -17,7 +17,8 @@
 */
 package org.apache.abdera.test.ext.thread;
 
-import junit.framework.Assert;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.ext.thread.InReplyTo;
@@ -27,7 +28,7 @@ import org.apache.abdera.factory.Factory
 import org.apache.abdera.model.Entry;
 import org.junit.Test;
 
-public class ThreadTest extends Assert {
+public class ThreadTest {
 
   @Test
   public void testThread() throws Exception {

Modified: abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/ext/media/MediaTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/ext/media/MediaTest.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/ext/media/MediaTest.java
(original)
+++ abdera/java/trunk/extensions/media/src/test/java/org/apache/abdera/test/ext/media/MediaTest.java
Sun May 16 00:29:56 2010
@@ -20,13 +20,13 @@ package org.apache.abdera.test.ext.media
 import static org.apache.abdera.ext.media.MediaConstants.CONTENT;
 import static org.apache.abdera.ext.media.MediaConstants.GROUP;
 import static org.apache.abdera.ext.media.MediaConstants.TITLE;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.util.List;
 
-import junit.framework.Assert;
-
 import org.apache.abdera.Abdera;
 import org.apache.abdera.ext.media.MediaContent;
 import org.apache.abdera.ext.media.MediaGroup;
@@ -39,7 +39,7 @@ import org.apache.abdera.model.Entry;
 import org.apache.abdera.parser.Parser;
 import org.junit.Test;
 
-public class MediaTest extends Assert {
+public class MediaTest {
 
   @Test
   public void testMedia() throws Exception {

Modified: abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/model/TestSelectNodes.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/model/TestSelectNodes.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/model/TestSelectNodes.java
(original)
+++ abdera/java/trunk/extensions/opensearch/src/test/java/org/apache/abdera/test/ext/opensearch/model/TestSelectNodes.java
Sun May 16 00:29:56 2010
@@ -1 +1 @@
-package org.apache.abdera.test.ext.opensearch.model;

import java.io.IOException;
import
java.io.PrintWriter;
import java.io.StringWriter;
import java.util.List;

import org.apache.abdera.Abdera;
import
org.apache.abdera.ext.opensearch.OpenSearchConstants;
import org.apache.abdera.ext.opensearch.model.IntegerElement;
import
org.apache.abdera.model.Feed;
import org.apache.abdera.writer.Writer;
import org.apache.abdera.xpath.XPath;
import
org.junit.Assert;
import org.junit.Test;


public class TestSelectNodes extends Assert{
	
@Test
	public void testXPath() throws IOException {
		Feed f = Abdera.getInstance().newFeed();
	IntegerElement ext = f.addExtension(OpenSearchConstants.START_INDEX);
		ext.setValue(101);
	XPath path = Abdera.getNewXPath();
		List result = path.selectNodes("node()", ext);
		assertTrue(result.size()
> 0);
	}
	
	@Test
	public void testJson() throws IOException {
		Abdera abdera = Abdera.getInstance();
	Feed f = abdera.newFeed();
		IntegerElement ext = f
 .addExtension(OpenSearchConstants.START_INDEX);
		ext.setValue(101);
		Writer json = abdera.getWriterFactory().getWriter("json");
	
		StringWriter stWriter = new StringWriter();
		PrintWriter pWriter = new PrintWriter(stWriter);
	f.writeTo(json, pWriter);
		assertTrue(stWriter.toString().contains("101"));
		assertTrue(stWriter.toString().contains("os:startIndex"));
}
	
}
\ No newline at end of file
+package org.apache.abdera.test.ext.opensearch.model;

import static org.junit.Assert.assertTrue;

import
java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.List;

import
org.apache.abdera.Abdera;
import org.apache.abdera.ext.opensearch.OpenSearchConstants;
import
org.apache.abdera.ext.opensearch.model.IntegerElement;
import org.apache.abdera.model.Feed;
import
org.apache.abdera.writer.Writer;
import org.apache.abdera.xpath.XPath;
import org.junit.Test;


public
class TestSelectNodes {
	
	@Test
	public void testXPath() throws IOException {
		Feed f =
Abdera.getInstance().newFeed();
		IntegerElement ext = f.addExtension(OpenSearchConstants.START_INDEX);
	ext.setValue(101);
		XPath path = Abdera.getNewXPath();
		List result = path.selectNodes("node()",
ext);
		assertTrue(result.size() > 0);
	}
	
	@Test
	public void testJson() throws IOException
{
		Abdera abdera = Abdera.getInstance();
		Feed f = abdera.newFeed();
		IntegerElement ex
 t = f.addExtension(OpenSearchConstants.START_INDEX);
		ext.setValue(101);
		Writer json =
abdera.getWriterFactory().getWriter("json");
		
		StringWriter stWriter = new StringWriter();
	PrintWriter pWriter = new PrintWriter(stWriter);
		f.writeTo(json, pWriter);
		assertTrue(stWriter.toString().contains("101"));
	assertTrue(stWriter.toString().contains("os:startIndex"));
	}
	
}
\ No newline at end of file

Modified: abdera/java/trunk/extensions/rss/src/test/java/org/apache/abdera/test/ext/rss/RssTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/rss/src/test/java/org/apache/abdera/test/ext/rss/RssTest.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/rss/src/test/java/org/apache/abdera/test/ext/rss/RssTest.java
(original)
+++ abdera/java/trunk/extensions/rss/src/test/java/org/apache/abdera/test/ext/rss/RssTest.java
Sun May 16 00:29:56 2010
@@ -17,6 +17,9 @@
 */
 package org.apache.abdera.test.ext.rss;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
 import java.io.InputStream;
 import java.util.List;
 
@@ -25,10 +28,9 @@ import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
 import org.apache.abdera.model.Person;
-import org.junit.Assert;
 import org.junit.Test;
 
-public class RssTest extends Assert {
+public class RssTest {
 
   @Test
   public void testRSS1() {

Modified: abdera/java/trunk/extensions/serializer/src/test/java/org/apache/abdera/test/ext/serializer/SerializerTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/serializer/src/test/java/org/apache/abdera/test/ext/serializer/SerializerTest.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/serializer/src/test/java/org/apache/abdera/test/ext/serializer/SerializerTest.java
(original)
+++ abdera/java/trunk/extensions/serializer/src/test/java/org/apache/abdera/test/ext/serializer/SerializerTest.java
Sun May 16 00:29:56 2010
@@ -17,13 +17,13 @@
 */
 package org.apache.abdera.test.ext.serializer;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.util.Calendar;
 import java.util.Date;
 
-import junit.framework.Assert;
-
 import org.apache.abdera.Abdera;
 import org.apache.abdera.ext.serializer.ConventionSerializationContext;
 import org.apache.abdera.ext.serializer.annotation.Author;
@@ -39,7 +39,7 @@ import org.apache.abdera.model.Entry;
 import org.apache.abdera.writer.StreamWriter;
 import org.junit.Test;
 
-public class SerializerTest extends Assert {
+public class SerializerTest {
 
   static Date date_now = new Date();
   static Calendar cal_now = Calendar.getInstance();

Modified: abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/ext/sharing/SharingTest.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/ext/sharing/SharingTest.java?rev=944745&r1=944744&r2=944745&view=diff
==============================================================================
--- abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/ext/sharing/SharingTest.java
(original)
+++ abdera/java/trunk/extensions/sharing/src/test/java/org/apache/abdera/test/ext/sharing/SharingTest.java
Sun May 16 00:29:56 2010
@@ -17,12 +17,16 @@
 */
 package org.apache.abdera.test.ext.sharing;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 import java.io.StringReader;
 import java.util.Date;
 import java.util.List;
 
-import junit.framework.Assert;
-
 import org.apache.abdera.Abdera;
 import org.apache.abdera.ext.sharing.Conflicts;
 import org.apache.abdera.ext.sharing.History;
@@ -39,8 +43,7 @@ import org.apache.abdera.model.Entry;
 import org.apache.abdera.model.Feed;
 import org.junit.Test;
 
-public class SharingTest
-    extends Assert {
+public class SharingTest {
   
   @Test
   public void testSharingFactory() throws Exception {



Mime
View raw message