Kris Wong

    Kris Wong

    3 years ago
    is it possible to load a text file resource in a unit test from the 'jvmTest' source set? javaClass.getResource("/filename") does not seem to be working.
    Dico

    Dico

    3 years ago
    I had the same problem.
    Kris Wong

    Kris Wong

    3 years ago
    yeah I was not able to find any solution. ended up just pasting the text content into my tests.
    Dico

    Dico

    3 years ago
    I made the tests read the file from the source path 😂
    Kris Wong

    Kris Wong

    3 years ago
    is the test working directory just the project source root?
    Dico

    Dico

    3 years ago
    It's the directory containg
    src
    You might want to set the working dir of the gradle task
    runTestJvm
    Kris Wong

    Kris Wong

    3 years ago
    gotcha, thanks