[java-metadata-aggregator] 03/03: Use TestNG, not JUnit

Ian Young ian at iay.org.uk
Mon Jul 17 11:27:24 EDT 2017


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch master
in repository java-metadata-aggregator.

View the commit online:
http://git.shibboleth.net/view/?p=java-metadata-aggregator.git;a=commit;h=15c3c5f02d637ed7ba134ef78cf9e80b414b5605

commit 15c3c5f02d637ed7ba134ef78cf9e80b414b5605
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Mon Jul 17 16:25:40 2017 +0100

    Use TestNG, not JUnit
---
 .../pipeline/FilesInDirectoryMultiOutputStrategyTest.java      |  6 +++---
 .../metadata/pipeline/MultiOutputSerializationStageTest.java   | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/FilesInDirectoryMultiOutputStrategyTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/FilesInDirectoryMultiOutputStrategyTest.java
index beeb2a3..22e9cc7 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/FilesInDirectoryMultiOutputStrategyTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/FilesInDirectoryMultiOutputStrategyTest.java
@@ -21,12 +21,12 @@ package net.shibboleth.metadata.pipeline;
 import java.io.File;
 import java.io.OutputStream;
 
+import org.testng.Assert;
 import org.testng.annotations.Test;
 
 import com.google.common.base.Function;
 import com.google.common.io.Files;
 
-import junit.framework.Assert;
 import net.shibboleth.metadata.Item;
 import net.shibboleth.metadata.ItemId;
 import net.shibboleth.metadata.MockItem;
@@ -43,8 +43,8 @@ public class FilesInDirectoryMultiOutputStrategyTest {
     
     private void checkOneFile(final File dir, final String expectedName) {
         final File[] files = dir.listFiles();
-        Assert.assertEquals(1, files.length);
-        Assert.assertEquals(expectedName, files[0].getName());
+        Assert.assertEquals(files.length, 1);
+        Assert.assertEquals(files[0].getName(), expectedName);
     }
 
     // Test with a prefix, a suffix, and an ID transform that doubles the name
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/MultiOutputSerializationStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/MultiOutputSerializationStageTest.java
index 0895287..8e826f0 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/MultiOutputSerializationStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/MultiOutputSerializationStageTest.java
@@ -26,9 +26,9 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import junit.framework.Assert;
 import net.shibboleth.metadata.Item;
 import net.shibboleth.metadata.ItemId;
 import net.shibboleth.metadata.ItemSerializer;
@@ -110,10 +110,10 @@ public class MultiOutputSerializationStageTest {
         stage.execute(items);
         
         final Map<String, String> map = strategy.map;
-        Assert.assertEquals(3, map.size());
-        Assert.assertEquals("aaaContent", map.get("aaa"));
-        Assert.assertEquals("bbbContent", map.get("bbb"));
-        Assert.assertEquals("cccContent", map.get("ccc"));
+        Assert.assertEquals(map.size(), 3);
+        Assert.assertEquals(map.get("aaa"), "aaaContent");
+        Assert.assertEquals(map.get("bbb"), "bbbContent");
+        Assert.assertEquals(map.get("ccc"), "cccContent");
     }
 
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list