Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/main/java/com/codacy/utils/Math.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public int magicAdd(int x, int y) {
if (y == magicNumber) {
return y - x;
} else {
System.out.println("hey");
return x + y;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/com/codacy/utils/MathTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ public void shouldAddNumbers() {
}

// Uncomment this to have 100% coverage
// @Test
// public void shouldSubtractIfMagicNumber() {
// Math math = new Math(4);
// assertEquals(1, math.magicAdd(3, 4));
// }
@Test
public void shouldSubtractIfMagicNumber() {
Math math = new Math(4);
assertEquals(1, math.magicAdd(3, 4));
}
}