Class JavaTestGenerator<T extends JavaTestGenerator<T>>

    • Constructor Detail

      • JavaTestGenerator

        public JavaTestGenerator()
    • Method Detail

      • create

        public void create()
        Description copied from interface: TestGenerator
        Create tests with this generator.
      • createJavaFileBuilder

        protected com.squareup.javapoet.JavaFile.Builder createJavaFileBuilder​(com.squareup.javapoet.TypeSpec.Builder testTypeBuilder)
      • getBaseType

        protected com.squareup.javapoet.TypeName getBaseType()
        Gets the test class base type to extend from.
        Returns:
        TypeName of the base type
      • getBaseExtension

        protected com.squareup.javapoet.AnnotationSpec getBaseExtension()
        Gets the Junit5 base extension to use.
        Returns:
        The AnnotationSpec of the Junit5 extension
      • getCitrusAnnotation

        protected com.squareup.javapoet.AnnotationSpec getCitrusAnnotation()
        Gets the Citrus XML test annotation.
        Returns:
        The AnnotationSpec for XML tests
      • getActions

        protected List<com.squareup.javapoet.CodeBlock> getActions()
        List of test actions to be added as code to the method body section of the test.
        Returns:
        A list of actions to execute
      • withMode

        public T withMode​(TestGenerator.GeneratorMode mode)
        Set the mode describing which part (client/server) to use.
        Parameters:
        mode - The mode to generate the test for
        Returns:
        The modified JavaTestGenerator
      • createAnnotationBuilder

        protected com.squareup.javapoet.AnnotationSpec.Builder createAnnotationBuilder​(String packageName,
                                                                                       String simpleName)