Skip to content

Commit

Permalink
Override the log method so that it can be invoked by a unit test (tha…
Browse files Browse the repository at this point in the history
…t doesn't initialize the ServletContext).
  • Loading branch information
DavidWhitlock committed Sep 15, 2024
1 parent c6a9390 commit f889f90
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,9 @@ private String getParameter(String name, HttpServletRequest request) {
String getDefinition(String word) {
return this.dictionary.get(word);
}

@Override
public void log(String msg) {
System.out.println(msg);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,9 @@ private String getParameter(String name, HttpServletRequest request) {
String getDefinition(String word) {
return this.dictionary.get(word);
}

@Override
public void log(String msg) {
System.out.println(msg);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,8 @@ String getDefinition(String word) {
return this.dictionary.get(word);
}

@Override
public void log(String msg) {
System.out.println(msg);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,9 @@ private String getParameter(String name, HttpServletRequest request) {
String getDefinition(String word) {
return this.dictionary.get(word);
}

@Override
public void log(String msg) {
System.out.println(msg);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,9 @@ private String getParameter(String name, HttpServletRequest request) {
String getDefinition(String word) {
return this.dictionary.get(word);
}

@Override
public void log(String msg) {
System.out.println(msg);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,8 @@ String getDefinition(String word) {
return this.dictionary.get(word);
}

@Override
public void log(String msg) {
System.out.println(msg);
}
}

0 comments on commit f889f90

Please sign in to comment.