Github user twogee commented on a diff in the pull request:
https://github.com/apache/ant/pull/78#discussion_r232795363
--- Diff: src/tests/junit/org/apache/tools/ant/types/CharSetTest.java ---
@@ -0,0 +1,20 @@
+package org.apache.tools.ant.types;
+
+import org.apache.tools.ant.BuildException;
+import org.junit.Test;
+
+import java.util.Arrays;
+
+public class CharSetTest {
+ @Test
+ public void testCorrectNames() {
+ String[] expected = {"UTF-8", "ISO-8859-1", "037", "us", "IBM500"};
+ Arrays.stream(expected).forEach(new CharSet()::setValue);
+ }
+
+ @Test(expected = BuildException.class)
+ public void testNonExistentNames() {
+ String[] nonexistent = {"mojibake", "dummy"};
+ Arrays.stream(nonexistent).forEach(new CharSet()::setValue);
--- End diff --
I was lazy... ð the tests are properly parameterised now
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]