Added Addons to handle adding commands & modules and related properties.

Commands now have their own properties and are initialized with the bot instance.
This commit is contained in:
Erik C. Thauvin 2020-04-28 21:01:18 -07:00
parent e2faa55c9f
commit 5c3b2074ba
52 changed files with 669 additions and 570 deletions

View file

@ -55,6 +55,6 @@ public class CalcTest {
@Test
public void testCalcImpl() {
AbstractModuleTest.testAbstractModule(new Calc());
AbstractModuleTest.testAbstractModule(new Calc(null));
}
}

View file

@ -68,6 +68,6 @@ public class CurrencyConverterTest {
@Test
public void testCurrencyConvertererImpl() {
AbstractModuleTest.testAbstractModule(new CurrencyConverter());
AbstractModuleTest.testAbstractModule(new CurrencyConverter(null));
}
}

View file

@ -51,7 +51,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
public class GoogleSearchTest extends LocalProperties {
@Test
public void testGoogleSearchImpl() {
AbstractModuleTest.testAbstractModule(new GoogleSearch());
AbstractModuleTest.testAbstractModule(new GoogleSearch(null));
}
@SuppressFBWarnings("LEST_LOST_EXCEPTION_STACK_TRACE")

View file

@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class JokeTest {
@Test
public void testJokeImpl() {
AbstractModuleTest.testAbstractModule(new Joke());
AbstractModuleTest.testAbstractModule(new Joke(null));
}
@Test

View file

@ -49,7 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class LookupTest {
@Test
public void testLookupImpl() {
AbstractModuleTest.testAbstractModule(new Lookup());
AbstractModuleTest.testAbstractModule(new Lookup(null));
}
@Test

View file

@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class PingTest {
@Test
public void testPingImpl() {
AbstractModuleTest.testAbstractModule(new Ping());
AbstractModuleTest.testAbstractModule(new Ping(null));
}
@Test

View file

@ -84,6 +84,6 @@ public class StockQuoteTest extends LocalProperties {
@Test
public void testStockQuoteImpl() {
AbstractModuleTest.testAbstractModule(new StockQuote());
AbstractModuleTest.testAbstractModule(new StockQuote(null));
}
}

View file

@ -33,7 +33,6 @@
package net.thauvin.erik.mobibot.modules;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import net.thauvin.erik.mobibot.Constants;
import org.testng.annotations.Test;
import java.net.InetAddress;
@ -72,7 +71,7 @@ public class TwitterTest extends LocalProperties {
getProperty(Twitter.CONSUMER_SECRET_PROP),
getProperty(Twitter.TOKEN_PROP),
getProperty(Twitter.TOKEN_SECRET_PROP),
getProperty(Constants.TWITTER_HANDLE_PROP),
getProperty(Twitter.HANDLE_PROP),
msg,
true).getText()).as("twitterPost(" + msg + ')').isEqualTo(msg);
}

View file

@ -74,6 +74,6 @@ public class Weather2Test extends LocalProperties {
@Test
public void testWeather2Impl() {
AbstractModuleTest.testAbstractModule(new Weather2());
AbstractModuleTest.testAbstractModule(new Weather2(null));
}
}

View file

@ -54,6 +54,6 @@ public class WordTimeTest {
@Test
public void testWorldTimeImpl() {
AbstractModuleTest.testAbstractModule(new Lookup());
AbstractModuleTest.testAbstractModule(new Lookup(null));
}
}