com.thalesgroup.hudson.plugins.tusarnotifier.service
Class TusarNotifierValidationService

java.lang.Object
  extended by com.thalesgroup.hudson.plugins.tusarnotifier.service.TusarNotifierValidationService
All Implemented Interfaces:
java.io.Serializable

public class TusarNotifierValidationService
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
TusarNotifierValidationService()
           
 
Method Summary
 boolean checkFileIsNotEmpty(java.io.File inputFile)
          Checks if the current input file is not empty
 boolean validateInputFile(TusarToolInfo tusarToolInfo, java.io.File inputFile)
          Validates an input file
 boolean validateOutputFile(TusarToolInfo tusarToolInfo, java.io.File inputFile, java.io.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

TusarNotifierValidationService

public TusarNotifierValidationService()
Method Detail

checkFileIsNotEmpty

public boolean checkFileIsNotEmpty(java.io.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(TusarToolInfo tusarToolInfo,
                                 java.io.File inputFile)
                          throws TusarNotifierException
Validates an input file

Parameters:
tusarToolInfo - the tusar tool tool info wrapper
inputFile - the current input file
Returns:
true if the validation is success, false otherwise
Throws:
TusarNotifierException - com.thalesgroup.hudson.plugins.tusarnotifier.exception.TusarNotifierException an XUnitException when there are validation exceptions

validateOutputFile

public boolean validateOutputFile(TusarToolInfo tusarToolInfo,
                                  java.io.File inputFile,
                                  java.io.File junitTargetFile)
                           throws TusarNotifierException
Validates the converted file against a JUnit format

Parameters:
tusarToolInfo - the tusar 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:
TusarNotifierException - com.thalesgroup.hudson.plugins.tusarnotifier.exception.TusarNotifierException


Copyright © 2010. All Rights Reserved.