From a38e8ee435f33c9a8236d7998e6799420f634712 Mon Sep 17 00:00:00 2001 From: Thomas Papendieck Date: Wed, 28 Nov 2018 17:52:36 +0100 Subject: [PATCH] test code refactored --- .../java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java b/TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java index c41e87b..ae569d9 100644 --- a/TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java +++ b/TDD-pure-function/src/test/java/de/edu/hsfulda/ciip/tdd/BowlingCalculatorTest.java @@ -7,12 +7,13 @@ import org.junit.Test; public class BowlingCalculatorTest { + private final BownlingCalculator bownlingCalculator = new BownlingCalculator(); + @Test public void returnsZeroWhenNoPinIsHit() { // arrange String listOfThrows = "-- -- -- -- -- -- -- -- -- --"; int expectedValue = 0; - BownlingCalculator bownlingCalculator = new BownlingCalculator(); // act int calculatedResult = bownlingCalculator.evaluate(listOfThrows); @@ -26,7 +27,6 @@ public class BowlingCalculatorTest { // arrange String listOfThrows = "11 22 33 44 54 63 72 81 -9 --"; int expectedValue = 65; - BownlingCalculator bownlingCalculator = new BownlingCalculator(); // act int calculatedResult = bownlingCalculator.evaluate(listOfThrows);