Skip to content

Commit

Permalink
Add test using ResourceManager
Browse files Browse the repository at this point in the history
  • Loading branch information
fmagin committed Jan 26, 2025
1 parent cde09f2 commit 0442b99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/kotlin/SampleTest.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ghidra.examples.Sample
import resources.ResourceManager
import kotlin.test.Test
import kotlin.test.assertEquals

Expand All @@ -10,4 +11,10 @@ class SampleTest {
val expected = 42
assertEquals(expected, testSample.sum(40, 2))
}

@Test
fun testResourceManager() {
val testJson = ResourceManager.getResource("testfile.txt")
assertEquals(testJson.readText(), "test")
}
}
Empty file removed src/test/resources/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions src/test/resources/testfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test

0 comments on commit 0442b99

Please sign in to comment.