Package cli.commands
Class RunTest
- java.lang.Object
-
- cli.commands.RunTest
-
-
Constructor Summary
Constructors Constructor Description RunTest()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
hasGoodInput(java.lang.String[] args)
This methods is used to check if the command has good input from the userstatic void
helpCommand(java.lang.String[] args)
This is the help command: it displays a message to better explain the command itselfstatic void
main(java.lang.String[] args)
main() is the implementation of the command.static java.util.List<java.lang.String>
readTextFile(java.lang.String filePath)
This method reads text file pathstatic void
writeTextFile(java.lang.String fileName, java.lang.String s)
This method writes in a text filestatic void
wrongArgumentHelp()
This method implements all the help that will be displayed to the user if he enters a wrong input
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
main() is the implementation of the command. It will interact with the core.Main application the runTest command: Run the test suite of the myVelib framework- Parameters:
args
- the arguments of the command
-
helpCommand
public static void helpCommand(java.lang.String[] args)
This is the help command: it displays a message to better explain the command itself- Parameters:
args
- the arguments of the command
-
wrongArgumentHelp
public static void wrongArgumentHelp()
This method implements all the help that will be displayed to the user if he enters a wrong input
-
hasGoodInput
public static boolean hasGoodInput(java.lang.String[] args)
This methods is used to check if the command has good input from the user- Parameters:
args
- the arguments of the command- Returns:
- true, if the command has good input. false, otherwise
-
readTextFile
public static java.util.List<java.lang.String> readTextFile(java.lang.String filePath)
This method reads text file path- Parameters:
filePath
- path of the file we want to read- Returns:
- string that wad contained in the filePath
-
writeTextFile
public static void writeTextFile(java.lang.String fileName, java.lang.String s)
This method writes in a text file- Parameters:
fileName
- : name of the file we want to reads
- : what we want to write in the file
-
-