01: /*
02: * Copyright (C) The DNA Group. All rights reserved.
03: *
04: * This software is published under the terms of the DNA
05: * Software License version 1.1, a copy of which has been included
06: * with this distribution in the LICENSE.txt file.
07: */
08: package org.codehaus.dna;
09:
10: import org.codehaus.dna.ReleaseUtil;
11:
12: import junit.framework.TestCase;
13:
14: /**
15: *
16: * @author Peter Donald
17: * @version $Revision: 1.2 $ $Date: 2004/05/01 09:51:48 $
18: */
19: public class ReleaseUtilTestCase extends TestCase {
20: public void testReleaseOnReleasable() throws Exception {
21: final MockReleaseable releaseable = new MockReleaseable();
22: ReleaseUtil.release(releaseable);
23: assertEquals("isReleased", true, releaseable.isReleased());
24: }
25:
26: public void testReleaseOnNonReleasable() throws Exception {
27: final Object object = new Object();
28: ReleaseUtil.release(object);
29: }
30: }
|