Skip to content

Commit

Permalink
refactor: remove getGreeting method and update tests for main method
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony0380 committed Nov 2, 2024
1 parent 44b5a7b commit 9932c6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 0 additions & 3 deletions app/src/main/java/computability/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

public class App {

public String getGreeting() {
return "Hello world.";
}
public static void main(String[] args) {
Menu menu = new Menu();
menu.run();
Expand Down
10 changes: 6 additions & 4 deletions app/src/test/java/computability/AppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
*/
package computability;

import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

class AppTest {
@Test void appHasAGreeting() {
App classUnderTest = new App();
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");

@Test
void testMain() {
App app = new App();
assertNotNull(app);
}
}

0 comments on commit 9932c6d

Please sign in to comment.