Skip to content

Commit d6e514d

Browse files
committed
test(schema): enforce exception behavior when joining empty query parameter maps
- align test expectations with stricter QueryParamEnum validation Signed-off-by: Yoham Gabriel B. @Urbine <yohamg@programmer.net>
1 parent 2504bf9 commit d6e514d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/test/java/net/ygbstudio/powerwp4j/models/schema/WPQueryParamTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.ygbstudio.powerwp4j.models.schema;
22

3+
import static org.assertj.core.api.Assertions.assertThatException;
34
import static org.hamcrest.MatcherAssert.assertThat;
4-
import static org.hamcrest.Matchers.is;
55

66
import java.util.Collections;
77
import java.util.LinkedHashMap;
@@ -48,7 +48,8 @@ void joinQueryParamsWithTimestamp() {
4848

4949
@Test
5050
void joinQueryParamEmptyMapTest() {
51-
String resultingPath = QueryParamEnum.joinQueryParams(Collections.emptyMap());
52-
assertThat(resultingPath, is(""));
51+
assertThatException()
52+
.isThrownBy(() -> QueryParamEnum.joinQueryParams(Collections.emptyMap()))
53+
.isInstanceOf(IllegalArgumentException.class);
5354
}
5455
}

0 commit comments

Comments
 (0)