diff --git a/src/main/java/soen/tutorial/ArithmeticOperation.java b/src/main/java/soen/tutorial/ArithmeticOperation.java index 680cf234..0ec91768 100644 --- a/src/main/java/soen/tutorial/ArithmeticOperation.java +++ b/src/main/java/soen/tutorial/ArithmeticOperation.java @@ -2,8 +2,7 @@ public class ArithmeticOperation { - public Integer addOrSub(Integer a, Integer b) - { + public Integer addOrSub(Integer a, Integer b) { if (a > b) { return a - b; } else { diff --git a/src/main/java/soen/tutorial/ArithmeticOperations.java b/src/main/java/soen/tutorial/ArithmeticOperations.java deleted file mode 100644 index 50fb3927..00000000 --- a/src/main/java/soen/tutorial/ArithmeticOperations.java +++ /dev/null @@ -1,13 +0,0 @@ -package soen.tutorial; - -public class ArithmeticOperations { - - public Integer addOrSub(Integer a, Integer b) - { - if (a > b) { - return a - b; - } else { - return a + b; - } - } -} diff --git a/src/test/java/soen/tutorial/ArithmeticOperationTest.java b/src/test/java/soen/tutorial/ArithmeticOperationTest.java index 590602ba..5e87ecbe 100644 --- a/src/test/java/soen/tutorial/ArithmeticOperationTest.java +++ b/src/test/java/soen/tutorial/ArithmeticOperationTest.java @@ -6,26 +6,19 @@ public class ArithmeticOperationTest { - - @Test - public void testAdd() - { - - ArithmeticOperation operations = new ArithmeticOperation(); - Integer actual = operations.addOrSub(2, 6); - Integer expected = 8; - assertEquals(expected, actual); - - } @Test - public void testSub() - { + public void testAdd() { + ArithmeticOperation operations = new ArithmeticOperation(); + Integer actual = operations.addOrSub(2, 6); + Integer expected = 8; + assertEquals(expected, actual); + } + @Test + public void testSub() { ArithmeticOperation operations = new ArithmeticOperation(); Integer actual = operations.addOrSub(6, 2); Integer expected = 4; assertEquals(expected, actual); - } - } diff --git a/src/test/java/soen/tutorial/ArithmeticOperationsTest.java b/src/test/java/soen/tutorial/ArithmeticOperationsTest.java deleted file mode 100644 index 3c823d36..00000000 --- a/src/test/java/soen/tutorial/ArithmeticOperationsTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package soen.tutorial; - -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -public class ArithmeticOperationsTest { - - - @Test - public void testAdd() - { - - ArithmeticOperations operations = new ArithmeticOperations(); - Integer actual = operations.addOrSub(2, 6); - Integer expected = 8; - assertEquals(expected, actual); - - } - @Test - public void testSub() - { - - ArithmeticOperations operations = new ArithmeticOperations(); - Integer actual = operations.addOrSub(6, 2); - Integer expected = 4; - assertEquals(expected, actual); - - } - -}