1   /*
2    * Copyright (C) The DNA Group. All rights reserved.
3    *
4    * This software is published under the terms of the DNA
5    * Software License version 1.1, a copy of which has been included
6    * with this distribution in the LICENSE.txt file.
7    */
8   package org.codehaus.dna;
9   
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
20      extends TestCase
21  {
22      public void testReleaseOnReleasable()
23          throws Exception
24      {
25          final MockReleaseable releaseable = new MockReleaseable();
26          ReleaseUtil.release( releaseable );
27          assertEquals( "isReleased", true, releaseable.isReleased() );
28      }
29  
30      public void testReleaseOnNonReleasable()
31          throws Exception
32      {
33          final Object object = new Object();
34          ReleaseUtil.release( object );
35      }
36  }