Class JavaReviewerTest

java.lang.Object
org.machanism.machai.gw.reviewer.JavaReviewerTest

class JavaReviewerTest extends Object
  • Field Details

    • tempDir

      @TempDir Path tempDir
  • Constructor Details

    • JavaReviewerTest

      JavaReviewerTest()
  • Method Details

    • getSupportedFileExtensions_returnsJava

      @Test void getSupportedFileExtensions_returnsJava()
    • extractPackageName_variousCases

      @ParameterizedTest @CsvSource({"\'/* some header */\npackage org.example.test;\n// tail\', org.example.test","\'// no package here\npublic class X {}\', <default package>","\'package org.exa_mple.v2;\', org.exa_mple.v2","\'package\n org.example.deep.sub;\nclass X {}\', org.example.deep.sub"}) void extractPackageName_variousCases(String content, String expected)
    • perform_returnsNullWhenNoGuidanceTag

      @Test void perform_returnsNullWhenNoGuidanceTag() throws IOException
      Throws:
      IOException
    • perform_returnsNullWhenGuidanceTagPresentButNoCommentMatches

      @Test void perform_returnsNullWhenGuidanceTagPresentButNoCommentMatches() throws IOException
      Throws:
      IOException
    • perform_returnsNonNullForLineCommentGuidance

      @Test void perform_returnsNonNullForLineCommentGuidance() throws IOException
      Throws:
      IOException
    • perform_returnsNonNullForBlockCommentGuidance

      @Test void perform_returnsNonNullForBlockCommentGuidance() throws IOException
      Throws:
      IOException
    • perform_returnsNonNullForPackageInfoGuidance

      @Test void perform_returnsNonNullForPackageInfoGuidance() throws IOException
      Throws:
      IOException
    • perform_throwsIOExceptionForMissingFile

      @Test void perform_throwsIOExceptionForMissingFile()