View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.commons.collections4.bidimap;
18  
19  import java.util.TreeMap;
20  
21  import junit.framework.Test;
22  import org.apache.commons.collections4.BidiMap;
23  import org.apache.commons.collections4.BulkTest;
24  
25  /**
26   * JUnit tests.
27   *
28   */
29  public class TreeBidiMapTest<K extends Comparable<K>, V extends Comparable<V>> extends AbstractOrderedBidiMapTest<K, V> {
30  
31      public static Test suite() {
32          return BulkTest.makeSuite(TreeBidiMapTest.class);
33      }
34  
35      public TreeBidiMapTest(final String testName) {
36          super(testName);
37      }
38  
39      @Override
40      public BidiMap<K, V> makeObject() {
41          return new TreeBidiMap<>();
42      }
43  
44      @Override
45      public TreeMap<K, V> makeConfirmedMap() {
46          return new TreeMap<>();
47      }
48  
49      /**
50       * Override to prevent infinite recursion of tests.
51       */
52      @Override
53      public String[] ignoredTests() {
54          return new String[] {"TreeBidiMapTest.bulkTestInverseMap.bulkTestInverseMap"};
55      }
56  
57      @Override
58      public boolean isAllowNullKey() {
59          return false;
60      }
61  
62      @Override
63      public boolean isAllowNullValue() {
64          return false;
65      }
66  
67      @Override
68      public boolean isSetValueSupported() {
69          return false;
70      }
71  
72      @Override
73      public String getCompatibilityVersion() {
74          return "4";
75      }
76  
77  //    public void testCreate() throws Exception {
78  //        resetEmpty();
79  //        writeExternalFormToDisk((java.io.Serializable) map, "src/test/resources/data/test/TreeBidiMap.emptyCollection.version4.obj");
80  //        resetFull();
81  //        writeExternalFormToDisk((java.io.Serializable) map, "src/test/resources/data/test/TreeBidiMap.fullCollection.version4.obj");
82  //    }
83  
84  }