|
|
@ -16,6 +16,7 @@ package feign.template; |
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Collections; |
|
|
|
import static org.assertj.core.api.Assertions.assertThat; |
|
|
|
import static org.assertj.core.api.Assertions.assertThat; |
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThatObject; |
|
|
|
|
|
|
|
|
|
|
|
public class ExpressionsTest { |
|
|
|
public class ExpressionsTest { |
|
|
|
|
|
|
|
|
|
|
@ -27,6 +28,17 @@ public class ExpressionsTest { |
|
|
|
assertThat(expanded).isEqualToIgnoringCase("foo=bar"); |
|
|
|
assertThat(expanded).isEqualToIgnoringCase("foo=bar"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void malformedBodyTemplate() { |
|
|
|
|
|
|
|
String bodyTemplate = "{" + "a".repeat(65536) + "}"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
BodyTemplate template = BodyTemplate.create(bodyTemplate); |
|
|
|
|
|
|
|
} catch (Throwable e) { |
|
|
|
|
|
|
|
assertThatObject(e).isNotInstanceOf(StackOverflowError.class); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void androidCompatibility() { |
|
|
|
public void androidCompatibility() { |
|
|
|
// To match close brace on Android, it must be escaped due to the simpler ICU regex engine
|
|
|
|
// To match close brace on Android, it must be escaped due to the simpler ICU regex engine
|
|
|
|