Question: I need JUnit tests for this program ( 2 that test RandomDeck and 2 that test DeckList ) import java.util.Random; import java.util.Scanner; public class DeckHelp
I need JUnit tests for this program that test RandomDeck and that test DeckList
import java.util.Random;
import java.util.Scanner;
public class DeckHelp
static String DeckChoice;
static String List;
public static void mainString args
Scanner sc new ScannerSystemin;
System.out.printlnPlease enter which function you'd like Random or List: ;
String FunctionChoice scnextLine;
ifFunctionChoiceequalsRandom FunctionChoice.equalsrandom
RandomDeck;
else ifFunctionChoiceequalsList FunctionChoice.equalslist
DeckList;
else
System.out.printlnInvalid Input. Please restart the program.";
public static String RandomDeck
Random Rand new Random;
int DeckNum Rand.nextInt;
ifDeckNum
DeckChoice "Rapid";
System.out.printlnYou will run Rapid today. Make them fear the bunnies.";
ifDeckNum
DeckChoice "Hunters";
System.out.printlnYou will run Hunters today. Overwhelm the board with bodies.";
ifDeckNum
DeckChoice "Imperial";
System.out.printlnYou will run Imperial today. Hit the funny Dragon Mode into ST Paildramon combo again.";
ifDeckNum
DeckChoice "Gallant";
System.out.printlnFinish Gallant and run it you coward.";
return DeckChoice;
public static String DeckList
Scanner sc new ScannerSystemin;
System.out.printlnPlease enter which deck you'd like to see Rapid Imperial, Hunters, or Gallant: ;
String ListChoice scnextLine;
ifListChoiceequalsRapid ListChoice.equalsrapid
System.out.printlnList;
List "Rapid";
else ifListChoiceequalsImperial ListChoice.equalsimperial
System.out.printlnList;
List "Imperial";
else ifListChoiceequalsHunters ListChoice.equalshunters
System.out.printlnList;
List "Hunters";
else ifListChoiceequalsGallant ListChoice.equalsgallant
System.out.printlnList;
List "Gallant";
else
System.out.printlnInvalid Input. Please restart the program.";
return List;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
