KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > util > SettableIntValueTest


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.util;
5
6 import com.tc.test.TCTestCase;
7
8 public class SettableIntValueTest extends TCTestCase {
9
10   public final void testSettableInt() {
11     SettableIntValue siv = new SettableIntValue();
12     final int defaultValue = 12345;
13     final int actualValue = 9999;
14     assertFalse(defaultValue == actualValue);
15     assertEquals(defaultValue, siv.intValue(defaultValue));
16     
17     siv.setInt(actualValue);
18     assertEquals(actualValue, siv.intValue(defaultValue));
19     
20     siv.unset();
21     assertEquals(defaultValue, siv.intValue(defaultValue));
22     
23     
24   }
25
26 }
27
Popular Tags