~slub.team/goobi-indexserver/3.x

« back to all changes in this revision

Viewing changes to lucene/contrib/facet/src/test/org/apache/lucene/facet/index/CategoryContainerTestBase.java

  • Committer: Sebastian Meyer
  • Date: 2012-08-03 09:12:40 UTC
  • Revision ID: sebastian.meyer@slub-dresden.de-20120803091240-x6861b0vabq1xror
Remove Lucene and Solr source code and add patches instead
Fix Bug #985487: Auto-suggestion for the search interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package org.apache.lucene.facet.index;
2
 
 
3
 
import org.junit.Before;
4
 
 
5
 
import org.apache.lucene.util.LuceneTestCase;
6
 
import org.apache.lucene.facet.index.CategoryContainer;
7
 
import org.apache.lucene.facet.taxonomy.CategoryPath;
8
 
 
9
 
/**
10
 
 * Licensed to the Apache Software Foundation (ASF) under one or more
11
 
 * contributor license agreements.  See the NOTICE file distributed with
12
 
 * this work for additional information regarding copyright ownership.
13
 
 * The ASF licenses this file to You under the Apache License, Version 2.0
14
 
 * (the "License"); you may not use this file except in compliance with
15
 
 * the License.  You may obtain a copy of the License at
16
 
 *
17
 
 *     http://www.apache.org/licenses/LICENSE-2.0
18
 
 *
19
 
 * Unless required by applicable law or agreed to in writing, software
20
 
 * distributed under the License is distributed on an "AS IS" BASIS,
21
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
 
 * See the License for the specific language governing permissions and
23
 
 * limitations under the License.
24
 
 */
25
 
 
26
 
public abstract class CategoryContainerTestBase extends LuceneTestCase {
27
 
  
28
 
  protected CategoryContainer categoryContainer;
29
 
  protected CategoryPath[] initialCatgeories;
30
 
 
31
 
  @Before
32
 
  public void setCategoryContainer() {
33
 
    initialCatgeories = new CategoryPath[3];
34
 
    initialCatgeories[0] = new CategoryPath("one", "two", "three");
35
 
    initialCatgeories[1] = new CategoryPath("four");
36
 
    initialCatgeories[2] = new CategoryPath("five", "six");
37
 
 
38
 
    categoryContainer = new CategoryContainer();
39
 
 
40
 
    for (int i = 0; i < initialCatgeories.length; i++) {
41
 
      categoryContainer.addCategory(initialCatgeories[i]);
42
 
    }
43
 
  }
44
 
  
45
 
}