Skip navigation links
A B C D E F G I J K M O P R S T V W 

A

ApprobationContext - Class in com.github.writethemfirst.approvals
Wrapper around the approved and received files.
ApprobationContext(Path, String) - Constructor for class com.github.writethemfirst.approvals.ApprobationContext
 
Approvals - Class in com.github.writethemfirst.approvals
# Approvals
Approvals() - Constructor for class com.github.writethemfirst.approvals.Approvals
Constructs an Approvals object using
Approvals(Reporter) - Constructor for class com.github.writethemfirst.approvals.Approvals
Constructs an Approvals object using the StackUtils.callerClass(Class).
Approvals(Class<?>) - Constructor for class com.github.writethemfirst.approvals.Approvals
Constructs an Approvals object using the default Reporter (Generic.DEFAULT).
Approvals(Class<?>, Reporter) - Constructor for class com.github.writethemfirst.approvals.Approvals
Constructs an Approvals object.
ApprovalsFiles - Class in com.github.writethemfirst.approvals
ApprovalsFiles
ApprovalsFiles() - Constructor for class com.github.writethemfirst.approvals.ApprovalsFiles
Constructs an ApprovalsFiles using the StackUtils.callerClass(Class).
approvedFile(Path) - Method in class com.github.writethemfirst.approvals.ApprobationContext
 
ARAXIS - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows
 

B

BEYOND_COMPARE_3 - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows
 
BEYOND_COMPARE_4 - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows
 

C

callerClass(Class<?>) - Static method in class com.github.writethemfirst.approvals.utils.StackUtils
Returns the caller class of reference by searching the current thread stacktrace.
callerMethod(Class<?>) - Static method in class com.github.writethemfirst.approvals.utils.StackUtils
Returns the caller method of the provided referenceClass.
CODE_COMPARE - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows
 
com.github.writethemfirst.approvals - package com.github.writethemfirst.approvals
That package contains all the root objects to be used while working with Approvals-Java.
com.github.writethemfirst.approvals.reporters - package com.github.writethemfirst.approvals.reporters
 
com.github.writethemfirst.approvals.reporters.commands - package com.github.writethemfirst.approvals.reporters.commands
 
com.github.writethemfirst.approvals.reporters.softwares - package com.github.writethemfirst.approvals.reporters.softwares
 
com.github.writethemfirst.approvals.utils - package com.github.writethemfirst.approvals.utils
Contains Utils classes to be used internally by the framework.
Command - Class in com.github.writethemfirst.approvals.reporters.commands
Wrapper around an executable command outside the JVM.
Command(String, String) - Constructor for class com.github.writethemfirst.approvals.reporters.commands.Command
Represents the latest version of the executable found by scanning subfolders of path.
CommandReporter - Class in com.github.writethemfirst.approvals.reporters
A reporter which delegates execution to an external command.
CommandReporter(Command) - Constructor for class com.github.writethemfirst.approvals.reporters.CommandReporter
 
CommandReporter(Command, String) - Constructor for class com.github.writethemfirst.approvals.reporters.CommandReporter
Constructs the reporter with a single String of arguments, split on spaces.
context(String) - Method in class com.github.writethemfirst.approvals.ApprovalsFiles
 
copy(Path, Path) - Static method in class com.github.writethemfirst.approvals.utils.FileUtils
 
createEmptyApprovedFileIfEmpty() - Method in class com.github.writethemfirst.approvals.ApprobationContext
 

D

DEFAULT - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Generic
 
DEFAULT - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows
 
DEFAULT_ARGUMENTS - Static variable in class com.github.writethemfirst.approvals.reporters.CommandReporter
 
defaultContext() - Method in class com.github.writethemfirst.approvals.ApprovalsFiles
 

E

execute(String...) - Method in class com.github.writethemfirst.approvals.reporters.commands.Command
Runs the executable outside the JVM by calling Runtime.exec().

F

FileUtils - Class in com.github.writethemfirst.approvals.utils
FileUtils
FileUtils() - Constructor for class com.github.writethemfirst.approvals.utils.FileUtils
 
FirstWorkingReporter - Class in com.github.writethemfirst.approvals.reporters
Reporter implementation which delegates to the first of its known reporter for which FirstWorkingReporter.isAvailable() is true.
FirstWorkingReporter(Reporter...) - Constructor for class com.github.writethemfirst.approvals.reporters.FirstWorkingReporter
 

G

Generic - Interface in com.github.writethemfirst.approvals.reporters.softwares
Defines Reporters which work on any OS.
GVIM - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows

I

IDEA - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows
 
isAvailable() - Method in interface com.github.writethemfirst.approvals.Reporter
A Reporter may not be relevant in all contexts, and they should provide some automated checks validating that they’re actually able to perform what they’re supposed to do in the current execution context (like libraries available in the classpath or Diff / Merge programs available on the computer).
isAvailable() - Method in class com.github.writethemfirst.approvals.reporters.CommandReporter
 
isAvailable() - Method in class com.github.writethemfirst.approvals.reporters.commands.Command
Tests if an executable file was found in the path.
isAvailable() - Method in class com.github.writethemfirst.approvals.reporters.FirstWorkingReporter
 
isAvailable() - Method in class com.github.writethemfirst.approvals.reporters.JUnit5Reporter
 
isAvailable() - Method in class com.github.writethemfirst.approvals.reporters.ThrowsReporter
 
isWindows - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Generic
 

J

JUnit5Reporter - Class in com.github.writethemfirst.approvals.reporters
This Reporter uses reflection to throw the same exceptions that the JUnit 5 framework would send.
JUnit5Reporter() - Constructor for class com.github.writethemfirst.approvals.reporters.JUnit5Reporter
 

K

KDIFF - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows

M

mismatch(Path, Path) - Method in interface com.github.writethemfirst.approvals.Reporter
A Reporter is called whenever a difference is found while comparing the output of a Program Under Tests and the existing approved files linked to the tests.
mismatch(Path, Path) - Method in class com.github.writethemfirst.approvals.reporters.CommandReporter
 
mismatch(Path, Path) - Method in class com.github.writethemfirst.approvals.reporters.FirstWorkingReporter
 
mismatch(Path, Path) - Method in class com.github.writethemfirst.approvals.reporters.JUnit5Reporter
 
mismatch(Path, Path) - Method in class com.github.writethemfirst.approvals.reporters.ThrowsReporter
 

O

os - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Generic
 

P

PROGRAM_FILES_KEY - Static variable in class com.github.writethemfirst.approvals.reporters.commands.Command
 

R

readApproved(Path) - Method in class com.github.writethemfirst.approvals.ApprobationContext
Reads from a file relative to the approved folder.
readApproved() - Method in class com.github.writethemfirst.approvals.ApprobationContext
Reads the content of the approved file linked to the current method execution.
readReceived() - Method in class com.github.writethemfirst.approvals.ApprobationContext
Reads the content of the received file linked to the current method execution.
receivedFile(Path) - Method in class com.github.writethemfirst.approvals.ApprobationContext
 
removeApproved(Path) - Method in class com.github.writethemfirst.approvals.ApprobationContext
 
removeApproved() - Method in class com.github.writethemfirst.approvals.ApprobationContext
Removes the approved file linked to the current method execution.
removeReceived(Path) - Method in class com.github.writethemfirst.approvals.ApprobationContext
 
removeReceived() - Method in class com.github.writethemfirst.approvals.ApprobationContext
Removes the received file linked to the current method execution.
Reporter - Interface in com.github.writethemfirst.approvals
Reporter

S

silentRead(Path) - Static method in class com.github.writethemfirst.approvals.utils.FileUtils
Reads the file located at the specified Path, and returns its content in case the file exists.
silentRemove(Path) - Static method in class com.github.writethemfirst.approvals.utils.FileUtils
Removes the file located at the specified Path if it exists.
silentRemoveRec(File) - Static method in class com.github.writethemfirst.approvals.utils.FileUtils
Removes recursively all elements if file is a directory, then removes file.
StackUtils - Class in com.github.writethemfirst.approvals.utils
# StackUtils
StackUtils() - Constructor for class com.github.writethemfirst.approvals.utils.StackUtils
 

T

ThrowsReporter - Class in com.github.writethemfirst.approvals.reporters
The most basic Reporter, it simply throws an AssertionError in case of mismatch between approved and received.
ThrowsReporter() - Constructor for class com.github.writethemfirst.approvals.reporters.ThrowsReporter
 
TORTOISE_SVN - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows
Download TortoiseSVN from https://tortoisesvn.net/downloads.html

V

verify(Object) - Method in class com.github.writethemfirst.approvals.Approvals
Compares the actual output of your program (the function’s argument) and the content of the approved file matching with the test method.
verify(Object, String) - Method in class com.github.writethemfirst.approvals.Approvals
Compares the actual output of your program (the function’s argument) and the content of the approved file matching with the test method.
verifyAgainstMasterFolder(Path) - Method in class com.github.writethemfirst.approvals.Approvals
 

W

Windows - Interface in com.github.writethemfirst.approvals.reporters.softwares
Defines Reporters which work on Windows only.
WINMERGE - Static variable in interface com.github.writethemfirst.approvals.reporters.softwares.Windows
 
write(String, Path) - Static method in class com.github.writethemfirst.approvals.utils.FileUtils
Writes the specified content in the file located at the specified Path.
writeApproved(String) - Method in class com.github.writethemfirst.approvals.ApprobationContext
Writes the provided content in the approved file linked to the current method execution.
writeApproved(String, Path) - Method in class com.github.writethemfirst.approvals.ApprobationContext
Writes content to a file relative to the approved folder.
writeReceived(String, Path) - Method in class com.github.writethemfirst.approvals.ApprobationContext
 
writeReceived(String) - Method in class com.github.writethemfirst.approvals.ApprobationContext
Writes the provided content in the received file linked to the current method execution.
A B C D E F G I J K M O P R S T V W 
Skip navigation links

Copyright © 2018 Write Them First!. All rights reserved.