01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.util;
05:
06: import com.tc.test.TCTestCase;
07:
08: public class SettableIntValueTest extends TCTestCase {
09:
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: }
|