utPLSQL / utPLSQL-maven-plugin

Maven plugin for running Unit Tests with utPLSQL v3
Apache License 2.0
13 stars 10 forks source link

adds support for regex, owner, type, name parameters #12

Closed jgarec closed 6 years ago

jgarec commented 6 years ago

Hi,

Seems pretty easy to add support of those parameters. Before submitting a new PR, are you ok with adding :

    @Parameter
    private String srcRegexExpression;

    @Parameter
    private Integer srcOwnerSubexpression;

    @Parameter
    private Integer srcNameSubexpression;

    @Parameter
    private Integer srcTypeSubexpression;

and then

    FileMapperOptions sourceMappingOptions = buildOptions(sources, PluginDefault.buildDefaultSource(), "sources");
    sourceMappingOptions.setRegexPattern(srcRegexExpression);
    sourceMappingOptions.setOwnerSubExpression(srcOwnerSubexpression);
    sourceMappingOptions.setNameSubExpression(srcNameSubexpression);
    sourceMappingOptions.setTypeSubExpression(srcTypeSubexpression);

Same with testRegexExpression, testOwnerSubexpression, testNameSubexpression, testTypeSubexpression

alberto-hernandez commented 6 years ago

Implemented but not tested. It seems pretty straight forward to pass this parameters.

jgarec commented 6 years ago

hi @alberto-hernandez, a second test is necessary. Using the same plsql code but having a custom project structure. i could submit a PR for this part if you want some help.

Considering this : if (testsTypeSubexpression != null) Not sure it's necessary as it will just set null (the default value) instead of null (the old value) if this parameter is not defined.

alberto-hernandez commented 6 years ago

I will sumit a second test with full feature.

About the testTypeSubexpression, If the plugin has no value to provide to the API they should let the API to take its default value. Now, currently is the same (null) but in the future it will break the compatibility if we don't check it.

I will appreciate if you provide documentation of this parameter in the Readme.