OSDN Git Service

change internal process method, which introducing ExtractionResultSet
[stigmata/stigmata.git] / src / test / java / jp / naist / se / stigmata / StigmataTest.java
index c38d0f0..9a0d757 100755 (executable)
@@ -16,25 +16,28 @@ import org.junit.Test;
  * @version $Revision$ $Date$\r
  */\r
 public class StigmataTest{\r
-    private BirthmarkEnvironment context;\r
+    private BirthmarkContext context;\r
+    private BirthmarkEnvironment environment;\r
 \r
     @Before\r
     public void prepare(){\r
-        context = Stigmata.getInstance().createEnvironment();\r
+        Stigmata stigmata = Stigmata.getInstance();\r
+        context = stigmata.createContext();\r
+        environment = context.getEnvironment();\r
     }\r
 \r
     @Test\r
     public void checkAvailableServices() throws Exception{\r
-        Assert.assertNotNull(context.getService("smc"));\r
-        Assert.assertNotNull(context.getService("cvfv"));\r
-        Assert.assertNotNull(context.getService("is"));\r
-        Assert.assertNotNull(context.getService("uc"));\r
-        Assert.assertNotNull(context.getService("kgram"));\r
+        Assert.assertNotNull(environment.getService("smc"));\r
+        Assert.assertNotNull(environment.getService("cvfv"));\r
+        Assert.assertNotNull(environment.getService("is"));\r
+        Assert.assertNotNull(environment.getService("uc"));\r
+        Assert.assertNotNull(environment.getService("kgram"));\r
     }\r
 \r
     @Test\r
     public void checkSmcBirthmarkService() throws Exception{\r
-        BirthmarkSpi service = context.getService("smc");\r
+        BirthmarkSpi service = environment.getService("smc");\r
 \r
         Assert.assertNotNull(service.getComparator());\r
         Assert.assertNotNull(service.getExtractor());\r
@@ -50,7 +53,7 @@ public class StigmataTest{
 \r
     @Test\r
     public void checkCvfvBirthmarkService() throws Exception{\r
-        BirthmarkSpi service = context.getService("cvfv");\r
+        BirthmarkSpi service = environment.getService("cvfv");\r
 \r
         Assert.assertNotNull(service.getComparator());\r
         Assert.assertNotNull(service.getExtractor());\r
@@ -66,7 +69,7 @@ public class StigmataTest{
 \r
     @Test\r
     public void checkIsBirthmarkService() throws Exception{\r
-        BirthmarkSpi service = context.getService("is");\r
+        BirthmarkSpi service = environment.getService("is");\r
 \r
         Assert.assertNotNull(service.getComparator());\r
         Assert.assertNotNull(service.getExtractor());\r
@@ -82,7 +85,7 @@ public class StigmataTest{
 \r
     @Test\r
     public void checkUcBirthmarkService() throws Exception{\r
-        BirthmarkSpi service = context.getService("uc");\r
+        BirthmarkSpi service = environment.getService("uc");\r
 \r
         Assert.assertNotNull(service.getComparator());\r
         Assert.assertNotNull(service.getExtractor());\r
@@ -98,7 +101,7 @@ public class StigmataTest{
 \r
     @Test\r
     public void checkKgramBirthmarkService() throws Exception{\r
-        BirthmarkSpi service = context.getService("kgram");\r
+        BirthmarkSpi service = environment.getService("kgram");\r
 \r
         Assert.assertNotNull(service.getComparator());\r
         Assert.assertNotNull(service.getExtractor());\r