Skip to content

Commit c7e5f4e

Browse files
committed
Normalise line endings
1 parent 78f7e45 commit c7e5f4e

35 files changed

+1361
-1361
lines changed

src/test/java/org/culturegraph/mf/stream/pipe/StreamBufferTest.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.pipe;
17-
16+
package org.culturegraph.mf.stream.pipe;
17+
1818
import static org.junit.Assert.fail;
1919

2020
import org.culturegraph.mf.exceptions.FormatException;
2121
import org.culturegraph.mf.framework.StreamReceiver;
2222
import org.culturegraph.mf.stream.sink.EventList;
2323
import org.culturegraph.mf.stream.sink.StreamValidator;
2424
import org.junit.Test;
25-
26-
27-
/**
28-
* Tests {@link StreamBuffer}.
29-
*
25+
26+
27+
/**
28+
* Tests {@link StreamBuffer}.
29+
*
3030
* @author Markus Michael Geipel
31-
* @author Christoph Böhme
32-
*/
33-
public final class StreamBufferTest {
34-
35-
@Test
31+
* @author Christoph Böhme
32+
*/
33+
public final class StreamBufferTest {
34+
35+
@Test
3636
public void testCorrectBuffering(){
3737
final EventList list = new EventList();
3838
execTestEvents(list);
@@ -47,7 +47,7 @@ public void testCorrectBuffering(){
4747
buffer.closeStream();
4848
} catch (FormatException e) {
4949
fail("Error during replay: " + e);
50-
}
50+
}
5151
}
5252

5353
private void execTestEvents(final StreamReceiver receiver) {
@@ -62,5 +62,5 @@ private void execTestEvents(final StreamReceiver receiver) {
6262
receiver.literal("l3", "value4");
6363
receiver.endRecord();
6464
}
65-
66-
}
65+
66+
}

src/test/java/org/culturegraph/mf/stream/pipe/StreamLoggerTest.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.pipe;
17-
16+
package org.culturegraph.mf.stream.pipe;
17+
1818
import static org.junit.Assert.fail;
1919

2020
import org.culturegraph.mf.exceptions.FormatException;
2121
import org.culturegraph.mf.framework.StreamReceiver;
2222
import org.culturegraph.mf.stream.sink.EventList;
2323
import org.culturegraph.mf.stream.sink.StreamValidator;
2424
import org.junit.Test;
25-
26-
27-
/**
28-
* Tests if {@link StreamLogger} is correctly piping all events.
29-
*
30-
* @author Markus Michael Geipel, Christoph Böhme
31-
*/
32-
33-
public final class StreamLoggerTest {
34-
35-
@Test
36-
public void testCorrectPipeFunction() {
25+
26+
27+
/**
28+
* Tests if {@link StreamLogger} is correctly piping all events.
29+
*
30+
* @author Markus Michael Geipel, Christoph Böhme
31+
*/
32+
33+
public final class StreamLoggerTest {
34+
35+
@Test
36+
public void testCorrectPipeFunction() {
3737
final EventList list = new EventList();
3838
execTestEvents(list);
3939

@@ -47,7 +47,7 @@ public void testCorrectPipeFunction() {
4747
} catch (FormatException e) {
4848
fail("Logger did not forward data as expected: " + e);
4949
}
50-
50+
5151
}
5252

5353
private void execTestEvents(final StreamReceiver receiver) {
@@ -62,5 +62,5 @@ private void execTestEvents(final StreamReceiver receiver) {
6262
receiver.literal("l3", "value4");
6363
receiver.endRecord();
6464
}
65-
66-
}
65+
66+
}

src/test/java/org/culturegraph/mf/stream/pipe/StreamTeeTest.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.pipe;
17-
16+
package org.culturegraph.mf.stream.pipe;
17+
1818
import static org.junit.Assert.fail;
1919

2020
import org.culturegraph.mf.exceptions.FormatException;
2121
import org.culturegraph.mf.framework.StreamReceiver;
2222
import org.culturegraph.mf.stream.sink.EventList;
2323
import org.culturegraph.mf.stream.sink.StreamValidator;
2424
import org.junit.Test;
25-
26-
27-
/**
28-
* Tests if {@link StreamTee} is correctly piping all events.
29-
*
30-
* @author Markus Michael Geipel
31-
*
32-
*/
33-
public final class StreamTeeTest {
34-
35-
@Test
25+
26+
27+
/**
28+
* Tests if {@link StreamTee} is correctly piping all events.
29+
*
30+
* @author Markus Michael Geipel
31+
*
32+
*/
33+
public final class StreamTeeTest {
34+
35+
@Test
3636
public void testCorrectTeeFunction() {
3737
final EventList list = new EventList();
3838
execTestEvents(list);
@@ -48,7 +48,7 @@ public void testCorrectTeeFunction() {
4848
tee.closeStream();
4949
} catch (FormatException e) {
5050
fail("Tee did not forward data as expected: " + e);
51-
}
51+
}
5252
}
5353

5454
private void execTestEvents(final StreamReceiver receiver) {
@@ -63,5 +63,5 @@ private void execTestEvents(final StreamReceiver receiver) {
6363
receiver.literal("l3", "value4");
6464
receiver.endRecord();
6565
}
66-
67-
}
66+
67+
}

src/test/java/org/culturegraph/mf/stream/pipe/StreamTimerTest.java

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,53 +13,53 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.pipe;
17-
18-
import org.culturegraph.mf.framework.DefaultStreamReceiver;
19-
import org.culturegraph.mf.stream.pipe.ObjectTimer;
20-
import org.culturegraph.mf.stream.pipe.StreamTimer;
21-
import org.junit.Test;
22-
23-
24-
/**
25-
* Tests {@link ObjectTimer}.
26-
*
27-
* @author Christoph Böhme
28-
*/
29-
public final class StreamTimerTest {
30-
31-
private static final long[] DURATIONS = { 150L, 20L, 30L, 202L };
32-
33-
/**
34-
* A module with a slow process method.
35-
*/
36-
private static final class BenchmarkedModule extends DefaultStreamReceiver {
37-
38-
@Override
39-
public void literal(final String name, final String value) {
40-
final long duration = Long.parseLong(value);
41-
try {
42-
Thread.sleep(duration);
43-
} catch (InterruptedException e) {
44-
return;
45-
}
46-
}
47-
}
48-
49-
@Test
50-
public void testObjectTimer() {
51-
final StreamTimer timer = new StreamTimer();
52-
final BenchmarkedModule benchmarkedModule = new BenchmarkedModule();
53-
54-
timer.setReceiver(benchmarkedModule);
55-
56-
for (int i=0; i < DURATIONS.length; ++i) {
57-
timer.startRecord(Integer.toString(i));
58-
timer.literal("duration", Long.toString(DURATIONS[i]));
59-
timer.endRecord();
60-
}
61-
62-
timer.closeStream();
63-
}
64-
65-
}
16+
package org.culturegraph.mf.stream.pipe;
17+
18+
import org.culturegraph.mf.framework.DefaultStreamReceiver;
19+
import org.culturegraph.mf.stream.pipe.ObjectTimer;
20+
import org.culturegraph.mf.stream.pipe.StreamTimer;
21+
import org.junit.Test;
22+
23+
24+
/**
25+
* Tests {@link ObjectTimer}.
26+
*
27+
* @author Christoph Böhme
28+
*/
29+
public final class StreamTimerTest {
30+
31+
private static final long[] DURATIONS = { 150L, 20L, 30L, 202L };
32+
33+
/**
34+
* A module with a slow process method.
35+
*/
36+
private static final class BenchmarkedModule extends DefaultStreamReceiver {
37+
38+
@Override
39+
public void literal(final String name, final String value) {
40+
final long duration = Long.parseLong(value);
41+
try {
42+
Thread.sleep(duration);
43+
} catch (InterruptedException e) {
44+
return;
45+
}
46+
}
47+
}
48+
49+
@Test
50+
public void testObjectTimer() {
51+
final StreamTimer timer = new StreamTimer();
52+
final BenchmarkedModule benchmarkedModule = new BenchmarkedModule();
53+
54+
timer.setReceiver(benchmarkedModule);
55+
56+
for (int i=0; i < DURATIONS.length; ++i) {
57+
timer.startRecord(Integer.toString(i));
58+
timer.literal("duration", Long.toString(DURATIONS[i]));
59+
timer.endRecord();
60+
}
61+
62+
timer.closeStream();
63+
}
64+
65+
}

src/test/java/org/culturegraph/mf/stream/pipe/bib/OreAggregationAdderTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.pipe.bib;
17-
18-
import org.culturegraph.mf.test.TestSuite;
19-
import org.junit.runner.RunWith;
20-
21-
22-
/**
23-
* @author Markus Michael Geipel
24-
*/
25-
@RunWith(TestSuite.class)
26-
public final class OreAggregationAdderTest {/*bind to xml test*/}
16+
package org.culturegraph.mf.stream.pipe.bib;
17+
18+
import org.culturegraph.mf.test.TestSuite;
19+
import org.junit.runner.RunWith;
20+
21+
22+
/**
23+
* @author Markus Michael Geipel
24+
*/
25+
@RunWith(TestSuite.class)
26+
public final class OreAggregationAdderTest {/*bind to xml test*/}

src/test/java/org/culturegraph/mf/stream/reader/MultiFormatReaderTest.java

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,46 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.culturegraph.mf.stream.reader;
17-
18-
import org.culturegraph.mf.stream.reader.MultiFormatReader;
19-
import org.junit.Assert;
20-
import org.junit.Test;
21-
22-
23-
/**
24-
* Tests {@link MultiFormatReader}
25-
* @author Markus Michael Geipel
26-
*
27-
*/
28-
public final class MultiFormatReaderTest {
29-
30-
private static final String PICA = "pica";
31-
private static final String MAB2 = "mab2";
32-
33-
34-
@Test(expected=IllegalStateException.class)
35-
public void testMissingFormat(){
36-
final MultiFormatReader formatReader = new MultiFormatReader();
37-
formatReader.read("gurk");
38-
}
39-
40-
@Test
41-
public void testFormatSwitch(){
42-
final MultiFormatReader formatReader = new MultiFormatReader();
43-
formatReader.setFormat(PICA);
44-
Assert.assertEquals(PICA, formatReader.getFormat());
45-
formatReader.setFormat(MAB2);
46-
Assert.assertEquals(MAB2, formatReader.getFormat());
47-
48-
}
49-
50-
@Test(expected=IllegalStateException.class)
51-
public void testMissingReceiver(){
52-
final MultiFormatReader formatReader = new MultiFormatReader();
53-
formatReader.setFormat(PICA);
54-
formatReader.read("hula");
55-
}
56-
57-
58-
}
16+
package org.culturegraph.mf.stream.reader;
17+
18+
import org.culturegraph.mf.stream.reader.MultiFormatReader;
19+
import org.junit.Assert;
20+
import org.junit.Test;
21+
22+
23+
/**
24+
* Tests {@link MultiFormatReader}
25+
* @author Markus Michael Geipel
26+
*
27+
*/
28+
public final class MultiFormatReaderTest {
29+
30+
private static final String PICA = "pica";
31+
private static final String MAB2 = "mab2";
32+
33+
34+
@Test(expected=IllegalStateException.class)
35+
public void testMissingFormat(){
36+
final MultiFormatReader formatReader = new MultiFormatReader();
37+
formatReader.read("gurk");
38+
}
39+
40+
@Test
41+
public void testFormatSwitch(){
42+
final MultiFormatReader formatReader = new MultiFormatReader();
43+
formatReader.setFormat(PICA);
44+
Assert.assertEquals(PICA, formatReader.getFormat());
45+
formatReader.setFormat(MAB2);
46+
Assert.assertEquals(MAB2, formatReader.getFormat());
47+
48+
}
49+
50+
@Test(expected=IllegalStateException.class)
51+
public void testMissingReceiver(){
52+
final MultiFormatReader formatReader = new MultiFormatReader();
53+
formatReader.setFormat(PICA);
54+
formatReader.read("hula");
55+
}
56+
57+
58+
}

0 commit comments

Comments
 (0)