Skip to content

Create Math2.java #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 9, 2025
Merged
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
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.codacy.utils;

public class Math {
public class NewMath {

private int magicNumber;

public Math(int magicNumber) {
public NewMath(int magicNumber) {
this.magicNumber = magicNumber;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

import static org.junit.Assert.assertEquals;

public class MathTest {
public class NewMathTest {
@Test
public void shouldAddNumbers() {
Math math = new Math(23);
NewMath math = new NewMath(23);


assertEquals(7, math.magicAdd(3, 4));
assertEquals(8, math.magicAdd(4, 4));
Expand Down
Loading