junit 4.11 does have assertNotEquals
This commit is contained in:
@@ -7,9 +7,6 @@ import org.junit.Test;
|
|||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.equalTo;
|
|
||||||
import static org.hamcrest.CoreMatchers.not;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test parsing of data with different encodings.
|
* Test parsing of data with different encodings.
|
||||||
*
|
*
|
||||||
@@ -25,7 +22,7 @@ public class TestEncoding {
|
|||||||
final LlvarParseInfo parser = new LlvarParseInfo();
|
final LlvarParseInfo parser = new LlvarParseInfo();
|
||||||
parser.setCharacterEncoding("UTF-8");
|
parser.setCharacterEncoding("UTF-8");
|
||||||
IsoValue<?> field = parser.parse(1, buf, 0, null);
|
IsoValue<?> field = parser.parse(1, buf, 0, null);
|
||||||
Assert.assertThat((String)field.getValue(), not(equalTo(data.substring(2))));
|
Assert.assertNotEquals(field.getValue(), data.substring(2));
|
||||||
parser.setCharacterEncoding("ISO-8859-1");
|
parser.setCharacterEncoding("ISO-8859-1");
|
||||||
field = parser.parse(1, buf, 0, null);
|
field = parser.parse(1, buf, 0, null);
|
||||||
Assert.assertEquals(data.substring(2), field.getValue());
|
Assert.assertEquals(data.substring(2), field.getValue());
|
||||||
|
|||||||
Reference in New Issue
Block a user