[ 
https://issues.apache.org/jira/browse/RAT-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17781262#comment-17781262
 ] 

Claude Warren commented on RAT-323:
-----------------------------------

My design here is that all UIs will require two things:

1) the UI itself will need a `public ReportConfiguration getConfiguration()` 
method that will return the ReportConfiguration as defined by the options 
within the UI.  Perhaps this should be an interface that all UI implement so 
that we can control and document what it is supposed to do.

2) All UI test libraries will include a "Test Driver" class that will implement 
a set of methods that map to the options in the ReportConfiguration (e.g. 
setCopyrightMessage).  The test suite will call the various methods on the 
testdriver to configure the underlying UI and then call getConfiguraiton() on 
the UI to get the configuration back.  Then we can test that the UI properly 
set the configuration.  The simplest solution for the TestDriver may be to 
extract an interface for the ReportConfiguration and have the driver implement 
that.

 

This should remove from the UI unit tests any need to actually execute the 
report and all of that will be covered in the core report testing.

 

 

 

 

> Harmonize UIs
> -------------
>
>                 Key: RAT-323
>                 URL: https://issues.apache.org/jira/browse/RAT-323
>             Project: Apache Rat
>          Issue Type: Improvement
>          Components: cli
>    Affects Versions: 0.16
>            Reporter: Claude Warren
>            Priority: Major
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> The UIs (CLI, ANT and Maven) were all developed separately and have different 
> options.
> There is an overlap in some functionality and the functionality of some UIs 
> is not found in others.
> This task is to do two things:
>  # collect all the UI options, and ensure that they are all supported in the 
> ReportConfiguration class. 
>  # modify the UIs so that the names of the options are the same (or as 
> similar as possible) across the three UIs.  Renamed methods are to be 
> deprecated in favour of new methods.
>  
> Example:
> apache-rat-plugin has 3 options: parseSCMIgnoresAsExcludes, 
> useEclipseDefaultExcludes, useIdeaDefaultExcludes that change the file 
> filter.  These are options that would be useful in all UIs and should be 
> moved to the ReportConfiguration so that any UI can set them.
> By harmonization I mean that options like the above are extracted from the 
> specific UIs where they are implemented and moved to the ReportConfiguration 
> so that the implementations are in one place and can be shared across all UIs.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to