File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
main/java/org/neo4j/driver
test/java/org/neo4j/driver Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 2525import org .neo4j .driver .util .Immutable ;
2626
2727import static java .lang .String .format ;
28- import static org .neo4j .driver .internal .util .Iterables .newHashMapWithSize ;
29- import static org .neo4j .driver .internal .util .Preconditions .checkArgument ;
3028import static org .neo4j .driver .Values .ofValue ;
3129import static org .neo4j .driver .Values .value ;
30+ import static org .neo4j .driver .internal .util .Iterables .newHashMapWithSize ;
31+ import static org .neo4j .driver .internal .util .Preconditions .checkArgument ;
3232
3333/**
3434 * The components of a Cypher query, containing the query text and parameter map.
@@ -201,7 +201,6 @@ public String toString()
201201 private static String validateQueryText (String query )
202202 {
203203 checkArgument ( query != null , "Cypher query text should not be null" );
204- checkArgument ( !query .isEmpty (), "Cypher query text should not be an empty string" );
205204 return query ;
206205 }
207206}
Original file line number Diff line number Diff line change 2525
2626import static org .hamcrest .Matchers .equalTo ;
2727import static org .hamcrest .junit .MatcherAssert .assertThat ;
28+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
2829import static org .junit .jupiter .api .Assertions .assertThrows ;
2930import static org .neo4j .driver .Values .parameters ;
3031
@@ -121,8 +122,12 @@ void shouldProhibitNullQuery()
121122 }
122123
123124 @ Test
124- void shouldProhibitEmptyQuery ()
125+ void shouldAcceptEmptyQuery ()
125126 {
126- assertThrows ( IllegalArgumentException .class , () -> new Query ( "" ) );
127+ // when
128+ Query query = new Query ( "" );
129+
130+ // then
131+ assertNotNull ( query );
127132 }
128133}
You can’t perform that action at this time.
0 commit comments