Package com.tistory.devyongsik.crescent.search.searcher

Source Code of com.tistory.devyongsik.crescent.search.searcher.CrescentDefaultDocSearcherTest

package com.tistory.devyongsik.crescent.search.searcher;

import java.io.IOException;

import javax.annotation.PostConstruct;

import junit.framework.Assert;

import org.junit.Test;

import com.tistory.devyongsik.crescent.query.CrescentSearchRequestWrapper;
import com.tistory.devyongsik.crescent.search.entity.SearchRequest;
import com.tistory.devyongsik.crescent.search.entity.SearchResult;
import com.tistory.devyongsik.utils.CrescentTestCaseUtil;

public class CrescentDefaultDocSearcherTest extends CrescentTestCaseUtil {

  @PostConstruct
  public void init() {
    super.init();
  }
 
  @Test
  public void search() throws IOException {
    SearchRequest searchRequest = new SearchRequest();
    searchRequest.setKeyword("1");
    searchRequest.setCollectionName("sample");
   
    CrescentSearchRequestWrapper csrw = new CrescentSearchRequestWrapper(searchRequest);
   
    SearchResult searchResult = crescentDocSearcher.search(csrw);
   
    Assert.assertTrue(searchResult.getResultList().size() > 0);
  }
}
TOP

Related Classes of com.tistory.devyongsik.crescent.search.searcher.CrescentDefaultDocSearcherTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.