Skip to content

Commit 51907a4

Browse files
Reorder methods more logically
1 parent 89c48dc commit 51907a4

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/test/java/org/javawebstack/orm/test/shared/verification/QueryVerification.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@ public void assertSectionContains(String topLevelKeyword, String containedSubstr
3737
this.assertSectionContains(topLevelKeyword, containedSubstring, 0);
3838
}
3939

40-
/**
41-
* Asserts that in ORDER BY section the given string is contained.
42-
* This method uses the String.contains method internally and is therefore case sensitive.
43-
*
44-
* @param containedSubstring The substring which should be contained in ORDER BY section.
45-
*/
46-
public void assertOrderByContains(String containedSubstring) {
47-
this.assertSectionContains("ORDER BY", containedSubstring);
48-
}
49-
5040
/**
5141
* Asserts that in the i-th occurring section of a given top level keyword, the given string is contained.
5242
* This method uses the String.contains method internally and is therefore case sensitive.
@@ -61,19 +51,29 @@ public void assertSectionContains(String topLevelKeyword, String containedSubstr
6151
sectionString = getSection(topLevelKeyword, sectionIndex);
6252
} catch (SectionIndexOutOfBoundException e) {
6353
fail(String.format(
64-
"A top level section of type %s and index %d was tested but only %d sections of that type existed.",
65-
e.getTopLevelKeyword(),
66-
e.getAttemptedIndex(),
67-
e.getSectionCount()
54+
"A top level section of type %s and index %d was tested but only %d sections of that type existed.",
55+
e.getTopLevelKeyword(),
56+
e.getAttemptedIndex(),
57+
e.getSectionCount()
6858
));
6959
}
7060

7161
assertTrue(
72-
sectionString.contains(containedSubstring),
73-
String.format("The occurrence of index %d of %s section of the query did not contain a substring %s but looked like this: %s. Note that the match is case-sensitive.", sectionIndex, topLevelKeyword, containedSubstring, sectionString)
62+
sectionString.contains(containedSubstring),
63+
String.format("The occurrence of index %d of %s section of the query did not contain a substring %s but looked like this: %s. Note that the match is case-sensitive.", sectionIndex, topLevelKeyword, containedSubstring, sectionString)
7464
);
7565
}
7666

67+
/**
68+
* Asserts that in ORDER BY section the given string is contained.
69+
* This method uses the String.contains method internally and is therefore case sensitive.
70+
*
71+
* @param containedSubstring The substring which should be contained in ORDER BY section.
72+
*/
73+
public void assertOrderByContains(String containedSubstring) {
74+
this.assertSectionContains("ORDER BY", containedSubstring);
75+
}
76+
7777
/**
7878
* Retrieves the inner part of a section by its keyword. With multiple occurrences it will only retrieve the first
7979
* one. It does not include the keyword and one whitespaces at start and end.

0 commit comments

Comments
 (0)