C# Class ApprovalTests.Reporters.GenericDiffReporter

Inheritance: IEnvironmentAwareReporter
Show file Open project: approvals/ApprovalTests.Net Class Usage Examples

Protected Properties

Property Type Description
actualDiffProgram string
arguments string
diffProgramNotFoundMessage string
fileTypes Func>
originalDiffProgram string

Public Methods

Method Description
EnsureFileExists ( string approved ) : void
GenericDiffReporter ( string diffProgram, string diffProgramNotFoundMessage ) : System
GenericDiffReporter ( string diffProgram, string argumentsFormat, string diffProgramNotFoundMessage ) : System
GenericDiffReporter ( string diffProgram, string argumentsFormat, string diffProgramNotFoundMessage, Func allowedFileTypes ) : System
GetActualProgramFile ( string fullPath ) : string
GetDiffProgram ( ) : string
GetImageFileTypes ( ) : HashSet
GetLaunchArguments ( string approved, string received ) : ApprovalTests.Reporters.LaunchArgs
GetTextFileTypes ( ) : HashSet
IsFileOneOf ( string forFile, IEnumerable filetypes ) : bool
IsTextFile ( string forFile ) : bool
IsValidFileType ( string forFile ) : bool
IsWorkingInThisEnvironment ( string forFile ) : bool
LaunchAsync ( ApprovalTests.Reporters.LaunchArgs launchArgs ) : void
RegisterImageFileTypes ( ) : void
RegisterTextFileTypes ( ) : void
Report ( string approved, string received ) : void

Protected Methods

Method Description
GenericDiffReporter ( DiffInfo info ) : System

Private Methods

Method Description
AssertDots ( string extensionsWithDots ) : void
IsMsTest ( ) : bool
Launch ( ApprovalTests.Reporters.LaunchArgs launchArgs, bool waitForExit ) : void

Method Details

EnsureFileExists() public static method

public static EnsureFileExists ( string approved ) : void
approved string
return void

GenericDiffReporter() protected method

protected GenericDiffReporter ( DiffInfo info ) : System
info DiffInfo
return System

GenericDiffReporter() public method

public GenericDiffReporter ( string diffProgram, string diffProgramNotFoundMessage ) : System
diffProgram string
diffProgramNotFoundMessage string
return System

GenericDiffReporter() public method

public GenericDiffReporter ( string diffProgram, string argumentsFormat, string diffProgramNotFoundMessage ) : System
diffProgram string
argumentsFormat string
diffProgramNotFoundMessage string
return System

GenericDiffReporter() public method

public GenericDiffReporter ( string diffProgram, string argumentsFormat, string diffProgramNotFoundMessage, Func allowedFileTypes ) : System
diffProgram string
argumentsFormat string
diffProgramNotFoundMessage string
allowedFileTypes Func
return System

GetActualProgramFile() public static method

public static GetActualProgramFile ( string fullPath ) : string
fullPath string
return string

GetDiffProgram() public method

public GetDiffProgram ( ) : string
return string

GetImageFileTypes() public static method

public static GetImageFileTypes ( ) : HashSet
return HashSet

GetLaunchArguments() public method

public GetLaunchArguments ( string approved, string received ) : ApprovalTests.Reporters.LaunchArgs
approved string
received string
return ApprovalTests.Reporters.LaunchArgs

GetTextFileTypes() public static method

public static GetTextFileTypes ( ) : HashSet
return HashSet

IsFileOneOf() public static method

public static IsFileOneOf ( string forFile, IEnumerable filetypes ) : bool
forFile string
filetypes IEnumerable
return bool

IsTextFile() public static method

public static IsTextFile ( string forFile ) : bool
forFile string
return bool

IsValidFileType() public method

public IsValidFileType ( string forFile ) : bool
forFile string
return bool

IsWorkingInThisEnvironment() public method

public IsWorkingInThisEnvironment ( string forFile ) : bool
forFile string
return bool

LaunchAsync() public static method

public static LaunchAsync ( ApprovalTests.Reporters.LaunchArgs launchArgs ) : void
launchArgs ApprovalTests.Reporters.LaunchArgs
return void

RegisterImageFileTypes() public static method

public static RegisterImageFileTypes ( ) : void
return void

RegisterTextFileTypes() public static method

public static RegisterTextFileTypes ( ) : void
return void

Report() public method

public Report ( string approved, string received ) : void
approved string
received string
return void

Property Details

actualDiffProgram protected property

protected string actualDiffProgram
return string

arguments protected property

protected string arguments
return string

diffProgramNotFoundMessage protected property

protected string diffProgramNotFoundMessage
return string

fileTypes protected property

protected Func> fileTypes
return Func>

originalDiffProgram protected property

protected string originalDiffProgram
return string