Skip to content

Commit 1a22183

Browse files
committed
Assert fix
1 parent a0ce0b0 commit 1a22183

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

test/org/opensolaris/opengrok/analysis/TextAnalyzerTest.java

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@
3030
import java.io.Writer;
3131
import java.nio.ByteBuffer;
3232
import java.nio.charset.Charset;
33-
34-
import junit.framework.Assert;
35-
3633
import org.apache.lucene.document.Document;
34+
import static org.junit.Assert.assertEquals;
3735
import org.junit.Test;
3836

3937
public class TextAnalyzerTest {
@@ -56,19 +54,19 @@ public void defaultEncoding() throws IOException {
5654
new TestableTextAnalyzer().analyze(new Document(),
5755
getStreamSource("hello".getBytes()), null);
5856

59-
Assert.assertEquals(defaultEncoding, encoding);
57+
assertEquals(defaultEncoding, encoding);
6058

61-
Assert.assertEquals("hello", contents);
59+
assertEquals("hello", contents);
6260
}
6361

6462
@Test
6563
public void resetsStreamOnShortInput() throws IOException {
6664
new TestableTextAnalyzer().analyze(new Document(),
6765
getStreamSource("hi".getBytes()), null);
6866

69-
Assert.assertEquals(defaultEncoding, encoding);
67+
assertEquals(defaultEncoding, encoding);
7068

71-
Assert.assertEquals("hi", contents);
69+
assertEquals("hi", contents);
7270
}
7371

7472
@Test
@@ -77,8 +75,8 @@ public void utf8WithBOM() throws IOException {
7775
new TestableTextAnalyzer().analyze(new Document(),
7876
getStreamSource(buffer), null);
7977

80-
Assert.assertEquals("hello", contents);
81-
Assert.assertEquals("UTF8", encoding);
78+
assertEquals("hello", contents);
79+
assertEquals("UTF8", encoding);
8280
}
8381

8482
@Test
@@ -90,9 +88,9 @@ public void utf16WithBOM() throws IOException {
9088
new TestableTextAnalyzer().analyze(new Document(),
9189
getStreamSource(bytes), null);
9290

93-
Assert.assertEquals("UTF-16", encoding);
91+
assertEquals("UTF-16", encoding);
9492

95-
Assert.assertEquals("hello", contents);
93+
assertEquals("hello", contents);
9694
}
9795

9896
@Test
@@ -110,9 +108,9 @@ public void utf16WithBOMAlternate() throws IOException {
110108
new TestableTextAnalyzer().analyze(new Document(),
111109
getStreamSource(bytes), null);
112110

113-
Assert.assertEquals("UTF-16", encoding);
111+
assertEquals("UTF-16", encoding);
114112

115-
Assert.assertEquals("hello", contents);
113+
assertEquals("hello", contents);
116114
}
117115

118116
public class TestableTextAnalyzer extends TextAnalyzer {

0 commit comments

Comments
 (0)