tdd-java-demo
tdd java demo with micro-commits
git clone https://9o.is/git/tdd-java-demo.git
commit 065aef310c04a742278874542b728028e14b1264 parent ff96db4f90ac54a288c9379bf4567770bbc87683 Author: Jul <jul@9o.is> Date: Wed, 31 Mar 2021 15:50:35 +0800 inline variables name and cost Diffstat:
| M | src/main/java/takehome/Runner.java | | | 4 | +--- |
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/main/java/takehome/Runner.java b/src/main/java/takehome/Runner.java @@ -16,9 +16,7 @@ public class Runner { } public void run() { - String name = "soup"; - double cost = 0.65; - double total = getTotal(new Item(name, cost)); + double total = getTotal(new Item("soup", 0.65)); DecimalFormat df = new DecimalFormat("0.00"); out.println("Total: $" + df.format(total));