org.jenkinsci.plugins.dtkit.service
Class DTKitBuilderValidationService

java.lang.Object
  extended by org.jenkinsci.plugins.dtkit.service.DTKitBuilderValidationService
All Implemented Interfaces:
Serializable

public class DTKitBuilderValidationService
extends Object
implements Serializable

Author:
Gregory Boissinot
See Also:
Serialized Form

Constructor Summary
DTKitBuilderValidationService()
           
 
Method Summary
 boolean checkFileIsNotEmpty(File inputFile)
          Checks if the current input file is not empty
 boolean validateInputFile(DTKitBuilderToolInfo dTKitBuilderToolInfo, File inputFile)
          Validates an input file
 boolean validateOutputFile(DTKitBuilderToolInfo dtKitBuilderToolInfo, File inputFile, File junitTargetFile)
          Validates the converted file against a JUnit format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTKitBuilderValidationService

public DTKitBuilderValidationService()
Method Detail

checkFileIsNotEmpty

public boolean checkFileIsNotEmpty(File inputFile)
Checks if the current input file is not empty

Parameters:
inputFile - the input file
Returns:
true if not empty, false otherwise

validateInputFile

public boolean validateInputFile(DTKitBuilderToolInfo dTKitBuilderToolInfo,
                                 File inputFile)
                          throws DTKitBuilderException
Validates an input file

Parameters:
dTKitBuilderToolInfo - the tool tool info wrapper
inputFile - the current input file
Returns:
true if the validation is success, false otherwise
Throws:
DTKitBuilderException - org.jenkinsci.plugins.dtkit.exception.TusarNotifierException an XUnitException when there are validation exceptions

validateOutputFile

public boolean validateOutputFile(DTKitBuilderToolInfo dtKitBuilderToolInfo,
                                  File inputFile,
                                  File junitTargetFile)
                           throws DTKitBuilderException
Validates the converted file against a JUnit format

Parameters:
dtKitBuilderToolInfo - the tool info wrapper object
inputFile - the input metric from the conversion
junitTargetFile - the converted input file
Returns:
true if the validation is success, false otherwise
Throws:
DTKitBuilderException - org.jenkinsci.plugins.dtkit.exception.TusarNotifierException


Copyright © 2004-2012. All Rights Reserved.