package jp.sourceforge.stigmata;
-/*
- * $Id$
- */
-
-import jp.sourceforge.stigmata.spi.BirthmarkSpi;
+import jp.sourceforge.stigmata.spi.BirthmarkService;
import org.junit.Assert;
import org.junit.Before;
/**
* test case.
* @author Haruaki TAMADA
- * @version $Revision$
*/
public class StigmataTest{
private BirthmarkContext context;
Assert.assertNotNull(environment.getService("cvfv"));
Assert.assertNotNull(environment.getService("is"));
Assert.assertNotNull(environment.getService("uc"));
- Assert.assertNotNull(environment.getService("kgram"));
}
@Test
public void checkSmcBirthmarkService() throws Exception{
- BirthmarkSpi service = environment.getService("smc");
+ BirthmarkService service = environment.getService("smc");
Assert.assertNotNull(service.getComparator());
Assert.assertNotNull(service.getExtractor());
@Test
public void checkCvfvBirthmarkService() throws Exception{
- BirthmarkSpi service = environment.getService("cvfv");
+ BirthmarkService service = environment.getService("cvfv");
Assert.assertNotNull(service.getComparator());
Assert.assertNotNull(service.getExtractor());
@Test
public void checkIsBirthmarkService() throws Exception{
- BirthmarkSpi service = environment.getService("is");
+ BirthmarkService service = environment.getService("is");
Assert.assertNotNull(service.getComparator());
Assert.assertNotNull(service.getExtractor());
@Test
public void checkUcBirthmarkService() throws Exception{
- BirthmarkSpi service = environment.getService("uc");
+ BirthmarkService service = environment.getService("uc");
Assert.assertNotNull(service.getComparator());
Assert.assertNotNull(service.getExtractor());
service.getExtractor().getClass().getName()
);
}
-
- @Test
- public void checkKgramBirthmarkService() throws Exception{
- BirthmarkSpi service = environment.getService("kgram");
-
- Assert.assertNotNull(service.getComparator());
- Assert.assertNotNull(service.getExtractor());
- Assert.assertEquals(
- "jp.sourceforge.stigmata.birthmarks.comparators.LogicalAndBirthmarkComparator",
- service.getComparator().getClass().getName()
- );
- Assert.assertEquals(
- "jp.sourceforge.stigmata.birthmarks.kgram.KGramBasedBirthmarkExtractor",
- service.getExtractor().getClass().getName()
- );
- }
}