Added test for AbstractModule classes.

This commit is contained in:
Erik C. Thauvin 2019-04-07 14:46:19 -07:00
parent 4e26666823
commit e77ccf3211
6 changed files with 76 additions and 10 deletions

View file

@ -123,7 +123,7 @@ public abstract class AbstractModule {
*
* @return <code>true</code> if the properties are valid, <code>false</code> otherwise.
*/
public boolean isValidProperties() {
boolean isValidProperties() {
for (final String s : getPropertyKeys()) {
if (!Utils.isValidString(properties.get(s))) {
return false;

View file

@ -49,7 +49,7 @@ public class Calc extends AbstractModule {
/**
* The Calc command.
*/
public static final String CALC_CMD = "calc";
private static final String CALC_CMD = "calc";
/**
* The default constructor.
@ -64,7 +64,7 @@ public class Calc extends AbstractModule {
* @param query The query.
* @return The calculation result.
*/
public static String calc(final String query) {
static String calc(final String query) {
final DecimalFormat decimalFormat = new DecimalFormat("#.##");
try {

View file

@ -46,15 +46,13 @@ import java.net.UnknownHostException;
* @since 1.0
*/
public final class Lookup extends AbstractModule {
/**
* The lookup command.
*/
public static final String LOOKUP_CMD = "lookup";
/**
* The whois default host.
*/
public static final String WHOIS_HOST = "whois.arin.net";
static final String WHOIS_HOST = "whois.arin.net";
// The lookup command.
private static final String LOOKUP_CMD = "lookup";
/**
* The default constructor
@ -72,7 +70,7 @@ public final class Lookup extends AbstractModule {
*/
public static String lookup(final String query)
throws UnknownHostException {
final StringBuilder buffer = new StringBuilder("");
final StringBuilder buffer = new StringBuilder();
final InetAddress[] results = InetAddress.getAllByName(query);
String hostInfo;