Class JavaTestBuilderImpl

    • Constructor Detail

      • JavaTestBuilderImpl

        public JavaTestBuilderImpl​(Method testedMethod,
                                   TestBuilder.ParamRole paramRole,
                                   FileTemplateConfig fileTemplateConfig,
                                   com.intellij.openapi.module.Module srcModule,
                                   TypeDictionary typeDictionary,
                                   com.intellij.util.lang.JavaVersion javaVersion,
                                   java.util.Map<java.lang.String,​java.lang.String> defaultTypeValues,
                                   java.util.Map<java.lang.String,​java.lang.String> typesOverrides)
    • Method Detail

      • buildCallParam

        protected void buildCallParam​(java.lang.StringBuilder testCodeString,
                                      Node<Param> paramNode)
      • hasEnumValues

        protected boolean hasEnumValues​(Type type)
      • renderEnumValue

        protected void renderEnumValue​(java.lang.StringBuilder testBuilder,
                                       Type type)
      • resolveInitializerKeyword

        @NotNull
        protected @NotNull java.lang.String resolveInitializerKeyword​(Type type,
                                                                      Method foundCtor)
      • buildCallParams

        protected void buildCallParams​(Method constructor,
                                       java.util.List<? extends Param> params,
                                       java.lang.StringBuilder testBuilder,
                                       Node<Param> ownerParamNode)
      • findValidConstructor

        @Nullable
        protected @Nullable Method findValidConstructor​(Type type,
                                                        boolean hasEmptyConstructor)
        Parameters:
        type - Input assumption: type constructors are sorted in descending order by no of arguments
      • isValidConstructor

        public boolean isValidConstructor​(Type type,
                                          Method constructor,
                                          boolean hasEmptyConstructor)
      • resolveNestedClassTypeName

        protected java.lang.String resolveNestedClassTypeName​(java.lang.String typeName)