Skip to content

Commit 49e4fa0

Browse files
Add assertOrderByContains method
1 parent 480b883 commit 49e4fa0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public class QueryVerification {
2222

2323
public QueryVerification(Query<?> query) {
2424
this.query = query;
25-
2625
}
2726

2827
/**
@@ -36,6 +35,16 @@ public void assertSectionContains(String topLevelKeyword, String containedSubstr
3635
this.assertSectionContains(topLevelKeyword, containedSubstring, 0);
3736
}
3837

38+
/**
39+
* Asserts that in ORDER BY section the given string is contained.
40+
* This method uses the String.contains method internally and is therefore case sensitive.
41+
*
42+
* @param containedSubstring The substring which should be contained in ORDER BY section.
43+
*/
44+
public void assertOrderByContains(String containedSubstring) {
45+
this.assertSectionContains("ORDER BY", containedSubstring);
46+
}
47+
3948
/**
4049
* Asserts that in the i-th occurring section of a given top level keyword, the given string is contained.
4150
* This method uses the String.contains method internally and is therefore case sensitive.

0 commit comments

Comments
 (0)