From 0303fa827f9fea9c11fefbce1045536183ccd688 Mon Sep 17 00:00:00 2001 From: vmishenev Date: Fri, 12 Nov 2021 13:55:11 +0300 Subject: Store checked exceptions into `ExtraProperties` (#2222) --- plugins/base/src/test/kotlin/model/JavaTest.kt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'plugins/base/src/test/kotlin') diff --git a/plugins/base/src/test/kotlin/model/JavaTest.kt b/plugins/base/src/test/kotlin/model/JavaTest.kt index 991b48ef..e473b352 100644 --- a/plugins/base/src/test/kotlin/model/JavaTest.kt +++ b/plugins/base/src/test/kotlin/model/JavaTest.kt @@ -250,6 +250,27 @@ class JavaTest : AbstractModelTest("/src/main/kotlin/java/Test.java", "java") { } } + @Test + fun throwsList() { + inlineModelTest( + """ + |class C { + | public void foo() throws java.io.IOException, ArithmeticException {} + |} + """, configuration = configuration + ) { + with((this / "java" / "C" / "foo").cast()) { + with(extra[CheckedExceptions]?.exceptions?.entries?.single()?.value.assertNotNull("CheckedExceptions")) { + this counts 2 + first().packageName equals "java.io" + first().classNames equals "IOException" + get(1).packageName equals "java.lang" + get(1).classNames equals "ArithmeticException" + } + } + } + } + @Test fun annotatedAnnotation() { inlineModelTest( -- cgit