Skip to content
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

Test branch #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/tudelft/numfinder/NumFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public void find(int[] nums) {

if(n < smallest)
smallest = n;
else if (n > largest)
if (n > largest)
largest = n;

}
Expand Down
15 changes: 15 additions & 0 deletions src/test/java/tudelft/gettingstarted/GettingStartedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,19 @@ public void addFiveTo20() {
// int result = new GettingStarted().addFive(???);
// Assertions.assertEquals(????,result);
// }

@Test
// Add the correct numbers
public void addFiveToZero() {
int result = new GettingStarted().addFive(0);
Assertions.assertEquals(5,result);
}
@Test
// Write this test
public void addFiveToMinusTwenty() {
int result = new GettingStarted().addFive(-20);
Assertions.assertEquals(-15,result);


}
}