01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.oscache.plugins.clustersupport;
06:
07: import com.opensymphony.oscache.base.Config;
08:
09: import junit.framework.Test;
10: import junit.framework.TestSuite;
11:
12: /**
13: * Test all the public methods of the broadcasting listener and assert the
14: * return values
15: *
16: * @author <a href="mailto:chris@swebtec.com">Chris Miller</a>
17: */
18: public final class TestJavaGroupsBroadcastingListener extends
19: BaseTestBroadcastingListener {
20: public TestJavaGroupsBroadcastingListener(String str) {
21: super (str);
22: }
23:
24: /**
25: * This methods returns the name of this test class to JUnit.
26: *
27: * @return The test for this class
28: */
29: public static Test suite() {
30: return new TestSuite(TestJavaGroupsBroadcastingListener.class);
31: }
32:
33: /**
34: * Returns a configured JavaGroupsBroadcastingListener instance
35: * for testing.
36: */
37: public AbstractBroadcastingListener getListener() {
38: return new JavaGroupsBroadcastingListener();
39: }
40:
41: /**
42: * Get the configuration for this listener
43: */
44: public Config getConfig() {
45: Config config = new Config();
46:
47: // Just specify the IP and leave the rest of the settings at
48: // default values.
49: config.set("cache.cluster.multicast.ip", "231.12.21.132");
50:
51: return config;
52: }
53: }
|