1 package org.apache.commons.jcs3.auxiliary.remote.server;
2
3 import org.apache.commons.jcs3.auxiliary.remote.server.behavior.RemoteType;
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 import junit.framework.TestCase;
25
26
27
28
29 public class RemoteCacheServerAttributesUnitTest
30 extends TestCase
31 {
32
33
34
35
36 public void testToString()
37 {
38 final RemoteCacheServerAttributes attributes = new RemoteCacheServerAttributes();
39 assertNotNull( "Should have a string.", attributes.toString() );
40 }
41
42
43
44
45 public void testSetRemoteTypeName_local()
46 {
47 final RemoteCacheServerAttributes attributes = new RemoteCacheServerAttributes();
48 attributes.setRemoteTypeName( "LOCAL" );
49 assertEquals( "Wrong type.", RemoteType.LOCAL, attributes.getRemoteType() );
50 assertEquals( "Wrong name", "LOCAL", attributes.getRemoteTypeName() );
51 }
52
53
54
55
56 public void testSetRemoteTypeName_cluster()
57 {
58 final RemoteCacheServerAttributes attributes = new RemoteCacheServerAttributes();
59 attributes.setRemoteTypeName( "CLUSTER" );
60 assertEquals( "Wrong type.", RemoteType.CLUSTER, attributes.getRemoteType() );
61 assertEquals( "Wrong name", "CLUSTER", attributes.getRemoteTypeName() );
62 }
63 }