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 SettableBoolValueTest extends TCTestCase {
09:
10: public final void testClone() {
11: SettableBoolValue original = new SettableBoolValue();
12: original.setBool(true);
13: SettableBoolValue copy = (SettableBoolValue) original.clone();
14: assertEquals(original, copy);
15: }
16:
17: public final void testSetBool() {
18: SettableBoolValue bool = new SettableBoolValue();
19: assertFalse(bool.boolValue());
20: assertFalse(bool.isSet());
21:
22: assertTrue(bool.boolValue(true));
23:
24: bool.setBool(true);
25: assertTrue(bool.boolValue());
26: assertTrue(bool.boolValue(false));
27: assertTrue(bool.boolValue(true));
28: }
29: }
|