Skip to content

Commit 67537c2

Browse files
committed
Fix indentation in Metamorph function tests.
1 parent 0362c5a commit 67537c2

File tree

12 files changed

+698
-709
lines changed

12 files changed

+698
-709
lines changed

metamorph/src/test/java/org/metafacture/metamorph/functions/DateFormatTest.java

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,33 @@
3636
*/
3737
public final class DateFormatTest {
3838

39-
@Rule
40-
public final MockitoRule mockitoRule = MockitoJUnit.rule();
39+
@Rule
40+
public final MockitoRule mockitoRule = MockitoJUnit.rule();
4141

42-
@Mock
43-
private StreamReceiver receiver;
42+
@Mock
43+
private StreamReceiver receiver;
4444

45-
private Metamorph metamorph;
45+
private Metamorph metamorph;
4646

47-
@Test
48-
public void shouldMakeOutputFormatConfigurable() {
49-
metamorph = InlineMorph.in(this)
50-
.with("<rules>")
51-
.with(" <data source='date'>")
52-
.with(" <dateformat outputformat='LONG' language='en' />")
53-
.with(" </data>")
54-
.with("</rules>")
55-
.createConnectedTo(receiver);
47+
@Test
48+
public void shouldMakeOutputFormatConfigurable() {
49+
metamorph = InlineMorph.in(this)
50+
.with("<rules>")
51+
.with(" <data source='date'>")
52+
.with(" <dateformat outputformat='LONG' language='en' />")
53+
.with(" </data>")
54+
.with("</rules>")
55+
.createConnectedTo(receiver);
5656

57-
metamorph.startRecord("1");
58-
metamorph.literal("date", "23.04.1564");
59-
metamorph.endRecord();
57+
metamorph.startRecord("1");
58+
metamorph.literal("date", "23.04.1564");
59+
metamorph.endRecord();
6060

61-
final InOrder ordered = inOrder(receiver);
62-
ordered.verify(receiver).startRecord("1");
63-
ordered.verify(receiver).literal("date", "April 23, 1564");
64-
ordered.verify(receiver).endRecord();
65-
ordered.verifyNoMoreInteractions();
66-
}
61+
final InOrder ordered = inOrder(receiver);
62+
ordered.verify(receiver).startRecord("1");
63+
ordered.verify(receiver).literal("date", "April 23, 1564");
64+
ordered.verify(receiver).endRecord();
65+
ordered.verifyNoMoreInteractions();
66+
}
6767

6868
}

metamorph/src/test/java/org/metafacture/metamorph/functions/ISBNTest.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
import org.junit.Test;
2424

25-
2625
/**
2726
* tests {@link ISBN}
2827
*
@@ -43,14 +42,11 @@ public final class ISBNTest {
4342
private static final String ISBN_INCORRECT_CHECK13 = "9781933988314";
4443
private static final String ISBN_INCORRECT_CHECK10 = "1933988311";
4544

46-
4745
private static final String ISBN_INCORRECT_SIZE1 = "12345678901234";
4846
private static final String ISBN_INCORRECT_SIZE2 = "123456789012";
4947
private static final String ISBN_INCORRECT_SIZE3 = "123456789";
5048
private static final String ERROR = "invalid";
5149

52-
53-
5450
@Test
5551
public void testProcess(){
5652
final ISBN isbn = new ISBN();
@@ -70,12 +66,12 @@ public void testTo13() {
7066

7167
@Test
7268
public void testTo10() {
73-
assertEquals(ISBN10A,ISBN.isbn13to10(ISBN13A));
69+
assertEquals(ISBN10A, ISBN.isbn13to10(ISBN13A));
7470
}
7571

7672
@Test
7773
public void testCleanse() {
78-
assertEquals(ISBN10A,ISBN.cleanse(ISBN10A_DIRTY));
74+
assertEquals(ISBN10A, ISBN.cleanse(ISBN10A_DIRTY));
7975
}
8076

8177
@Test(expected = IllegalArgumentException.class)
@@ -104,14 +100,12 @@ public void testIsValid() {
104100
assertTrue(ISBN.isValid(ISBN.cleanse(ISBN10F_DIRTY)));
105101
}
106102

107-
108103
public void testCleanseException1(){
109104
final ISBN isbn = new ISBN();
110105
isbn.setErrorString(ERROR);
111106
assertTrue(isbn.process(ISBN_INCORRECT_SIZE3).startsWith(ERROR));
112107
}
113108

114-
115109
public void testCleanseException2(){
116110
final ISBN isbn = new ISBN();
117111
isbn.setErrorString(ERROR);

metamorph/src/test/java/org/metafacture/metamorph/functions/LookupTest.java

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,19 @@ public void shouldReturnNullIfKeyDoesNotExist() {
9999
@Test
100100
public void shouldLookupValuesInLocalMap() {
101101
final Metamorph metamorph = InlineMorph.in(this)
102-
.with("<rules>")
103-
.with(" <data source='1'>")
104-
.with(" <lookup>")
105-
.with(" <entry name='a' value='A' />")
106-
.with(" </lookup>")
107-
.with(" </data>")
108-
.with(" <data source='2'>")
109-
.with(" <lookup default='B'>")
110-
.with(" <entry name='a' value='A' />")
111-
.with(" </lookup>")
112-
.with(" </data>")
113-
.with("</rules>")
114-
.createConnectedTo(receiver);
102+
.with("<rules>")
103+
.with(" <data source='1'>")
104+
.with(" <lookup>")
105+
.with(" <entry name='a' value='A' />")
106+
.with(" </lookup>")
107+
.with(" </data>")
108+
.with(" <data source='2'>")
109+
.with(" <lookup default='B'>")
110+
.with(" <entry name='a' value='A' />")
111+
.with(" </lookup>")
112+
.with(" </data>")
113+
.with("</rules>")
114+
.createConnectedTo(receiver);
115115

116116
metamorph.startRecord("1");
117117
metamorph.literal("1", "a");
@@ -132,23 +132,23 @@ public void shouldLookupValuesInLocalMap() {
132132
@Test
133133
public void shouldLookupValuesInReferencedMap() {
134134
final Metamorph metamorph = InlineMorph.in(this)
135-
.with("<rules>")
136-
.with(" <data source='1'>")
137-
.with(" <lookup in='map1' />")
138-
.with(" </data>")
139-
.with(" <data source='2'>")
140-
.with(" <lookup in='map2' />")
141-
.with(" </data>")
142-
.with("</rules>")
143-
.with("<maps>")
144-
.with(" <map name='map1'>")
145-
.with(" <entry name='a' value='A' />")
146-
.with(" </map>")
147-
.with(" <map name='map2' default='B'>")
148-
.with(" <entry name='a' value='A' />")
149-
.with(" </map>")
150-
.with("</maps>")
151-
.createConnectedTo(receiver);
135+
.with("<rules>")
136+
.with(" <data source='1'>")
137+
.with(" <lookup in='map1' />")
138+
.with(" </data>")
139+
.with(" <data source='2'>")
140+
.with(" <lookup in='map2' />")
141+
.with(" </data>")
142+
.with("</rules>")
143+
.with("<maps>")
144+
.with(" <map name='map1'>")
145+
.with(" <entry name='a' value='A' />")
146+
.with(" </map>")
147+
.with(" <map name='map2' default='B'>")
148+
.with(" <entry name='a' value='A' />")
149+
.with(" </map>")
150+
.with("</maps>")
151+
.createConnectedTo(receiver);
152152

153153
metamorph.startRecord("1");
154154
metamorph.literal("1", "a");
@@ -169,15 +169,15 @@ public void shouldLookupValuesInReferencedMap() {
169169
@Test
170170
public void shouldLookupValuesInMetadata() {
171171
final Metamorph metamorph = InlineMorph.in(this)
172-
.with("<meta>")
173-
.with(" <name>Hawaii</name>")
174-
.with("</meta>")
175-
.with("<rules>")
176-
.with(" <data source='data'>")
177-
.with(" <lookup in='__meta' />")
178-
.with(" </data>")
179-
.with("</rules>")
180-
.createConnectedTo(receiver);
172+
.with("<meta>")
173+
.with(" <name>Hawaii</name>")
174+
.with("</meta>")
175+
.with("<rules>")
176+
.with(" <data source='data'>")
177+
.with(" <lookup in='__meta' />")
178+
.with(" </data>")
179+
.with("</rules>")
180+
.createConnectedTo(receiver);
181181

182182
metamorph.startRecord("1");
183183
metamorph.literal("data", "name");

metamorph/src/test/java/org/metafacture/metamorph/functions/NormalizeUTF8Test.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import org.junit.Test;
2222

23-
2423
/**
2524
* Tests for class {@link NormalizeUTF8}.
2625
*
@@ -30,11 +29,11 @@ public final class NormalizeUTF8Test {
3029

3130
// The umlauts in this string are composed of two characters (u and ", e.g.):
3231
private static final String INPUT_STR =
33-
"Bauer, Sigmund: Über den Einfluß der Ackergeräthe auf den Reinertrag.";
32+
"Bauer, Sigmund: Über den Einfluß der Ackergeräthe auf den Reinertrag.";
3433

3534
// The umlauts in this string are individual characters:
3635
private static final String OUTPUT_STR =
37-
"Bauer, Sigmund: Über den Einfluß der Ackergeräthe auf den Reinertrag.";
36+
"Bauer, Sigmund: Über den Einfluß der Ackergeräthe auf den Reinertrag.";
3837

3938
@Test
4039
public void testProcess() {

0 commit comments

Comments
 (0)