Skip to content

Commit

Permalink
Added initialize function to avoid using intellij directly
Browse files Browse the repository at this point in the history
  • Loading branch information
anchouls committed Dec 14, 2023
1 parent 94dce6d commit c85157d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ import org.jetbrains.academy.test.system.java.ij.analyzer.hasConstantWithGivenVa
*/
open class BaseIjTestClass : BasePlatformTestCase() {

fun initialize(sourceText: String) {
super.setUp()
myFixture.configureByText("Task.java", sourceText)
}

fun hasConstantWithGivenValue(elementValue: String): Boolean =
myFixture.file.hasConstantWithGivenValue(elementValue)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import org.jetbrains.kotlin.psi.KtCallExpression
*/
open class BaseIjTestClass : BasePlatformTestCase() {

fun initialize(sourceText: String) {
super.setUp()
myFixture.configureByText("Task.kt", sourceText)
}

fun hasConstantWithGivenValue(elementValue: String): Boolean =
myFixture.file.hasConstantWithGivenValue(elementValue)

Expand Down

0 comments on commit c85157d

Please sign in to comment.