|
@@ -32,7 +32,10 @@ import com.dmdirc.harness.TestLoggingPlugin;
|
32
|
32
|
import com.dmdirc.harness.parser.TestParserFactory;
|
33
|
33
|
import com.dmdirc.parser.irc.ChannelInfo;
|
34
|
34
|
import com.dmdirc.addons.ui_dummy.DummyController;
|
|
35
|
+import com.dmdirc.plugins.PluginInfo;
|
|
36
|
+import com.dmdirc.util.ConfigFile;
|
35
|
37
|
import java.util.ArrayList;
|
|
38
|
+import java.util.Map;
|
36
|
39
|
import org.junit.BeforeClass;
|
37
|
40
|
import org.junit.Test;
|
38
|
41
|
import static org.junit.Assert.*;
|
|
@@ -53,7 +56,19 @@ public class LoggingPluginTest {
|
53
|
56
|
new TestParserFactory());
|
54
|
57
|
channel = new Channel(server, new ChannelInfo(server.getParser(), "#test"));
|
55
|
58
|
query = new Query(server, "foo!bar@baz");
|
|
59
|
+
|
|
60
|
+ final ConfigFile file = new ConfigFile(LoggingPlugin.class
|
|
61
|
+ .getResourceAsStream("plugin.config"));
|
|
62
|
+ file.read();
|
|
63
|
+
|
|
64
|
+ for (Map.Entry<String, String> entry : file.getKeyDomain("defaults").entrySet()) {
|
|
65
|
+ IdentityManager.getAddonIdentity().setOption("temp-plugin-logging",
|
|
66
|
+ entry.getKey(), entry.getValue());
|
|
67
|
+ }
|
|
68
|
+
|
56
|
69
|
lp = new TestLoggingPlugin();
|
|
70
|
+ lp.setDomain("temp-plugin-logging");
|
|
71
|
+ lp.domainUpdated();
|
57
|
72
|
lp.onLoad();
|
58
|
73
|
}
|
59
|
74
|
|