diff --git a/platform/vcs-tests/testSrc/com/intellij/vcs/test/utils.kt b/platform/vcs-tests/testSrc/com/intellij/vcs/test/utils.kt index 4ecb2dbc80a6..397a9f125d5d 100644 --- a/platform/vcs-tests/testSrc/com/intellij/vcs/test/utils.kt +++ b/platform/vcs-tests/testSrc/com/intellij/vcs/test/utils.kt @@ -40,16 +40,16 @@ inline fun overrideService(): Impl { return service() as Impl } -fun assertNotification(type: NotificationType, title: String, content: String, actions: List, actual: Notification): Notification { +fun assertNotification(type: NotificationType, title: String, content: String, actions: List?, actual: Notification): Notification { assertEquals("Incorrect notification type: " + tos(actual), type, actual.type) assertEquals("Incorrect notification title: " + tos(actual), title, actual.title) assertEquals("Incorrect notification content: " + tos(actual), cleanupForAssertion(content), cleanupForAssertion(actual.content)) - assertOrderedEquals("Incorrect notification actions", actual.actions.map { it.templatePresentation.text }, actions) + if (actions != null) assertOrderedEquals("Incorrect notification actions", actual.actions.map { it.templatePresentation.text }, actions) return actual } fun assertNotification(type: NotificationType, title: String, content: String, actual: Notification) = - assertNotification(type, title, content, listOf(), actual) + assertNotification(type, title, content, null, actual) fun assertSuccessfulNotification(title: String, content: String, actual: Notification) = assertNotification(NotificationType.INFORMATION, title, content, actual)