Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
- ArithmeticOperation.java
- ArithmeticOperationTest.java

Ref moar82#1
  • Loading branch information
bit172 committed Mar 31, 2021
1 parent e342b86 commit 9d74de8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
3 changes: 1 addition & 2 deletions src/main/java/soen/tutorial/ArithmeticOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
23 changes: 8 additions & 15 deletions src/test/java/soen/tutorial/ArithmeticOperationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}

}

0 comments on commit 9d74de8

Please sign in to comment.