View Javadoc
1   package org.djutils.immutablecollections;
2   
3   import static org.junit.Assert.assertFalse;
4   import static org.junit.Assert.assertTrue;
5   
6   import org.junit.Test;
7   
8   /**
9    * Test the enum Immutable.
10   * <p>
11   * Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
12   * BSD-style license. See <a href="https://djutils.org/docs/current/djutils/licenses.html">DJUTILS License</a>.
13   * <p>
14   * @version $Revision$, $LastChangedDate$, by $Author$, initial version Feb 26, 2019 <br>
15   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
16   * @author <a href="https://www.tudelft.nl/staff/p.knoppers/">Peter Knoppers</a>
17   */
18  public class TestImmutable
19  {
20      /**
21       * Test the methods of the enum Immutable.
22       */
23      @Test
24      public void testImmutable()
25      {
26          assertTrue("isWrap", Immutable.WRAP.isWrap());
27          assertTrue("isCopy", Immutable.COPY.isCopy());
28          assertFalse("isWrap", Immutable.COPY.isWrap());
29          assertFalse("isCopy", Immutable.WRAP.isCopy());
30          // That was easy.
31      }
32  
33  }