Package it.unimi.dsi.mg4j.tool

Source Code of it.unimi.dsi.mg4j.tool.TestDowncaseTermProcessor

package it.unimi.dsi.mg4j.tool;

import it.unimi.dsi.fastutil.io.BinIO;
import it.unimi.dsi.mg4j.index.DowncaseTermProcessor;
import it.unimi.dsi.mg4j.index.TermProcessor;
import it.unimi.dsi.fastutil.io.FastByteArrayInputStream;
import it.unimi.dsi.fastutil.io.FastByteArrayOutputStream;

import java.io.IOException;

import junit.framework.TestCase;

public class TestDowncaseTermProcessor extends TestCase {

  public void testReadResolve() throws IOException, ClassNotFoundException {
    TermProcessor t = DowncaseTermProcessor.getInstance();
    FastByteArrayOutputStream os = new FastByteArrayOutputStream();
    BinIO.storeObject( t, os );
    assertTrue( t == (TermProcessor)BinIO.loadObject( new FastByteArrayInputStream( os.array ) ) );
  }
}
TOP

Related Classes of it.unimi.dsi.mg4j.tool.TestDowncaseTermProcessor

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.