Skip to content

Commit

Permalink
test(java): remove mockito dependency and related test
Browse files Browse the repository at this point in the history
The test case for class with no modifier list is removed along with the mockito-kotlin dependency since it's no longer needed in the test suite.
  • Loading branch information
thelooter committed Nov 9, 2024
1 parent 83b0c18 commit 301a8f7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ dependencies {
}
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0")
}

intellijPlatform {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.github.catppuccin.jetbrains_icons.Icons
import com.github.catppuccin.jetbrains_icons.providers.JavaIconProvider
import com.github.catppuccin.jetbrains_icons.settings.PluginSettingsState
import com.intellij.icons.AllIcons
import com.intellij.psi.PsiClass
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase5
import com.intellij.testFramework.runInEdtAndGet
import com.intellij.ui.LayeredIcon
Expand All @@ -15,8 +14,6 @@ import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Tag
import org.junit.jupiter.api.Test
import org.mockito.kotlin.doReturn
import org.mockito.kotlin.mock

/**
* Test class for JavaIconProvider. This class tests various scenarios for icon provision for Java
Expand Down Expand Up @@ -343,15 +340,4 @@ class JavaIconProviderTest : LightJavaCodeInsightFixtureTestCase5() {

assertEquals(AllIcons.Nodes.PackageLocal, icon)
}

@Test
@DisplayName("Test that a class with no modifier list returns null for its modifier list")
fun getVisibilityIconForTesting_classWithNoModifierList_returnsNull() {
// Create a mock PsiClass that returns null for its modifier list
val mockClass = mock<PsiClass> { on { modifierList } doReturn null }

val icon = runInEdtAndGet { provider.getVisibilityIcon(mockClass) }

assertNull(icon)
}
}

0 comments on commit 301a8f7

Please sign in to comment.