Skip to content

Commit

Permalink
refactored tests to share test file name
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyegge committed Jun 25, 2024
1 parent 1c68b3f commit ba5a763
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class DocumentCodeTest : CodyIntegrationTestFixture() {
}

@Test
@TestFile("testProjects/documentCode/src/main/java/Foo.java")
@TestFile(TEST_FILE_PATH)
fun testGetsFoldingRanges() {
runAndWaitForNotifications(DocumentCodeAction.ID, TOPIC_FOLDING_RANGES)

Expand All @@ -59,7 +59,7 @@ class DocumentCodeTest : CodyIntegrationTestFixture() {
}

@Test
@TestFile("testProjects/documentCode/src/main/java/Foo.java")
@TestFile(TEST_FILE_PATH)
fun testGetsWorkingGroupLens() {
val assertsExecuted = AtomicInteger(0)
val showWorkingGroupSessionStateListener =
Expand Down Expand Up @@ -107,7 +107,7 @@ class DocumentCodeTest : CodyIntegrationTestFixture() {
}

@Test
@TestFile("testProjects/documentCode/src/main/java/Foo.java")
@TestFile(TEST_FILE_PATH)
fun testShowsAcceptLens() {
runAndWaitForNotifications(DocumentCodeAction.ID, TOPIC_DISPLAY_ACCEPT_GROUP)
assertInlayIsShown()
Expand Down Expand Up @@ -145,7 +145,7 @@ class DocumentCodeTest : CodyIntegrationTestFixture() {
}

@Test
@TestFile("testProjects/documentCode/src/main/java/Foo.java")
@TestFile(TEST_FILE_PATH)
fun testAccept() {
assertNoActiveSession()
assertNoInlayShown()
Expand All @@ -163,7 +163,7 @@ class DocumentCodeTest : CodyIntegrationTestFixture() {
}

@Test
@TestFile("testProjects/documentCode/src/main/java/Foo.java")
@TestFile(TEST_FILE_PATH)
fun testUndo() {
val originalDocument = myFixture.editor.document.text
runAndWaitForNotifications(DocumentCodeAction.ID, TOPIC_DISPLAY_ACCEPT_GROUP)
Expand All @@ -181,5 +181,6 @@ class DocumentCodeTest : CodyIntegrationTestFixture() {

companion object {
private val logger = Logger.getInstance(DocumentCodeTest::class.java)
private const val TEST_FILE_PATH = "testProjects/documentCode/src/main/java/Foo.java"
}
}

0 comments on commit ba5a763

Please sign in to comment.