KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > oscache > plugins > clustersupport > TestJavaGroupsBroadcastingListener


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.oscache.plugins.clustersupport;
6
7 import com.opensymphony.oscache.base.Config;
8
9 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="&#109;a&#105;&#108;&#116;&#111;:chris&#64;swebtec.&#99;&#111;&#109;">Chris Miller</a>
17  */

18 public final class TestJavaGroupsBroadcastingListener extends BaseTestBroadcastingListener {
19     public TestJavaGroupsBroadcastingListener(String JavaDoc str) {
20         super(str);
21     }
22
23     /**
24      * This methods returns the name of this test class to JUnit.
25      *
26      * @return The test for this class
27      */

28     public static Test suite() {
29         return new TestSuite(TestJavaGroupsBroadcastingListener.class);
30     }
31
32     /**
33      * Returns a configured JavaGroupsBroadcastingListener instance
34      * for testing.
35      */

36     public AbstractBroadcastingListener getListener() {
37         return new JavaGroupsBroadcastingListener();
38     }
39
40     /**
41      * Get the configuration for this listener
42      */

43     public Config getConfig() {
44         Config config = new Config();
45
46         // Just specify the IP and leave the rest of the settings at
47
// default values.
48
config.set("cache.cluster.multicast.ip", "231.12.21.132");
49
50         return config;
51     }
52 }
53
Popular Tags