Skip to content

Instantly share code, notes, and snippets.

@SproutSeeds
Created May 2, 2019 00:35
Show Gist options
  • Save SproutSeeds/0e988113e557c0643b957de57cdfbdcd to your computer and use it in GitHub Desktop.
Save SproutSeeds/0e988113e557c0643b957de57cdfbdcd to your computer and use it in GitHub Desktop.
Tests
public class CoffeeShopMain {
public static void testCase1() {
System.out.println("Test Case 1:");
CoffeeShop shop = new CoffeeShop();
for (int i = 0; i < 20; i++) {
shop.processOrder(new Order(13, 13, 3, 2));
}
System.out.println(shop);
}
public static void testCase2() {
System.out.println("\nTest Case 2:");
CoffeeShop shop = new CoffeeShop();
for (int i = 0; i < 10; i++) {
shop.processOrder(new Order(0, 30, 0, 5));
}
System.out.println(shop);
}
public static void testCase3() {
System.out.println("\nTest Case 3:");
CoffeeShop shop = new CoffeeShop();
for (int i = 0; i < 30; i++) {
shop.processOrder(new Order(9, 0, 4, 0));
}
System.out.println(shop);
}
public static void testCase4() {
System.out.println("\nTest Case 4:");
CoffeeShop shop = new CoffeeShop();
for (int i = 0; i < 50; i++) {
shop.processOrder(new Order(1, 1, 1, 1));
}
System.out.println(shop);
}
public static void testCase5() {
System.out.println("\nTest Case 5:");
CoffeeShop shop = new CoffeeShop();
System.out.println(shop);
}
public static void testCase6() {
System.out.println("\nTest Case 6:");
CoffeeShop shop = new CoffeeShop();
shop.processOrder(new Order(100, 100, 75, 50));
System.out.println(shop);
}
public static void main(String[] args) {
testCase1();
testCase2();
testCase3();
testCase4();
testCase5();
testCase6();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment