[Jiemamy-notify] commit [2247] 色々ミス修正。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 12月 11日 (木) 22:56:19 JST


Revision: 2247
          http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=2247
Author:   daisuke_m
Date:     2008-12-11 22:56:19 +0900 (Thu, 11 Dec 2008)

Log Message:
-----------
色々ミス修正。

Modified Paths:
--------------
    artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/exporter/SqlExporterTest.java
    artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java
    artemis/trunk/org.jiemamy.dialect.postgresql/pom.xml
    artemis/trunk/org.jiemamy.dialect.postgresql/src/test/java/org/jiemamy/dialect/postgresql/PostgresqlDialectTest.java
    artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ModelInputStreamTest.java

Added Paths:
-----------
    artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategy.java

Removed Paths:
-------------
    artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategyForTest.java


-------------- next part --------------
Modified: artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/exporter/SqlExporterTest.java
===================================================================
--- artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/exporter/SqlExporterTest.java	2008-12-11 13:38:16 UTC (rev 2246)
+++ artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/exporter/SqlExporterTest.java	2008-12-11 13:56:19 UTC (rev 2247)
@@ -35,7 +35,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.jiemamy.extension.ReflectionDialectAccessStrategyForTest;
+import org.jiemamy.extension.ReflectionDialectAccessStrategy;
 import org.jiemamy.extension.composer.ExportContext;
 import org.jiemamy.extension.composer.Exporter;
 import org.jiemamy.model.Artemis;
@@ -64,7 +64,7 @@
 	 */
 	@Before
 	public void setUp() throws Exception {
-		Jiemamy.init(Artemis.CORE, new ReflectionDialectAccessStrategyForTest());
+		Jiemamy.init(Artemis.CORE, new ReflectionDialectAccessStrategy());
 	}
 	
 	/**

Modified: artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java
===================================================================
--- artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java	2008-12-11 13:38:16 UTC (rev 2246)
+++ artemis/trunk/org.jiemamy.composer/src/test/java/org/jiemamy/composer/importer/DatabaseImporterTest.java	2008-12-11 13:56:19 UTC (rev 2247)
@@ -30,7 +30,7 @@
 import org.junit.runner.RunWith;
 import org.seasar.framework.unit.Seasar2;
 
-import org.jiemamy.extension.ReflectionDialectAccessStrategyForTest;
+import org.jiemamy.extension.ReflectionDialectAccessStrategy;
 import org.jiemamy.extension.composer.ImportContext;
 import org.jiemamy.extension.composer.Importer;
 import org.jiemamy.extension.dialect.Dialect;
@@ -74,7 +74,7 @@
 	 */
 	@Before
 	public void setUp() throws Exception {
-		Jiemamy.init(Artemis.CORE, new ReflectionDialectAccessStrategyForTest());
+		Jiemamy.init(Artemis.CORE, new ReflectionDialectAccessStrategy());
 		
 		RootModel rootModel = Jiemamy.newRootModel();
 		rootModel.setDialectId("org.jiemamy.dialect.postgresql.PostgresqlDialect");

Copied: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategy.java (from rev 2245, artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategyForTest.java)
===================================================================
--- artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategy.java	                        (rev 0)
+++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategy.java	2008-12-11 13:56:19 UTC (rev 2247)
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
+ * Created on 2008/12/10
+ *
+ * This file is part of Jiemamy.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.jiemamy.extension;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import org.jiemamy.exception.UnexpectedConditionError;
+import org.jiemamy.extension.dialect.Dialect;
+import org.jiemamy.model.Jiemamy;
+
+/**
+ * 相対パスから強引にDialectを取得するための、テスト用インスタンス取得戦略クラス。
+ * @author daisuke
+ */
+public class ReflectionDialectAccessStrategy extends Jiemamy.DefaultInstanceAccessStrategy<Dialect> {
+	
+	/**
+	 * コンストラクタ。
+	 * @category instance creation
+	 */
+	public ReflectionDialectAccessStrategy() {
+		try {
+			classLoader = new URLClassLoader(new URL[] {
+				new File("../org.jiemamy.dialect/target/classes").toURL(),
+				new File("../org.jiemamy.dialect.mysql/target/classes").toURL(),
+				new File("../org.jiemamy.dialect.postgresql/target/classes").toURL(),
+				new File("../org.jiemamy.dialect.sql99/target/classes").toURL()
+			});
+		} catch (MalformedURLException e) {
+			throw new UnexpectedConditionError("spell miss?", e);
+		}
+	}
+}


Property changes on: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategy.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategyForTest.java
===================================================================
--- artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategyForTest.java	2008-12-11 13:38:16 UTC (rev 2246)
+++ artemis/trunk/org.jiemamy.core/src/test/java/org/jiemamy/extension/ReflectionDialectAccessStrategyForTest.java	2008-12-11 13:56:19 UTC (rev 2247)
@@ -1,51 +0,0 @@
-/*
- * Copyright 2007-2008 MIYAMOTO Daisuke, jiemamy.org and the Others.
- * Created on 2008/12/10
- *
- * This file is part of Jiemamy.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
- * either express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
- */
-package org.jiemamy.extension;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import org.jiemamy.extension.dialect.Dialect;
-import org.jiemamy.model.Jiemamy;
-
-/**
- * 相対パスから強引にDialectを取得するための、テスト用インスタンス取得戦略クラス。
- * @author daisuke
- */
-public class ReflectionDialectAccessStrategyForTest extends Jiemamy.DefaultInstanceAccessStrategy<Dialect> {
-	
-	/**
-	 * コンストラクタ。
-	 * @category instance creation
-	 */
-	public ReflectionDialectAccessStrategyForTest() {
-		try {
-			classLoader = new URLClassLoader(new URL[] {
-				new File("../org.jiemamy.dialect/target/classes").toURL(),
-				new File("../org.jiemamy.dialect.mysql/target/classes").toURL(),
-				new File("../org.jiemamy.dialect.postgresql/target/classes").toURL(),
-				new File("../org.jiemamy.dialect.sql99/target/classes").toURL()
-			});
-		} catch (MalformedURLException e) {
-			// ignore
-		}
-	}
-}

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/pom.xml
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/pom.xml	2008-12-11 13:38:16 UTC (rev 2246)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/pom.xml	2008-12-11 13:56:19 UTC (rev 2247)
@@ -165,6 +165,13 @@
       <artifactId>org.jiemamy.dialect</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>org.jiemamy.core</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <reporting>
     <plugins>

Modified: artemis/trunk/org.jiemamy.dialect.postgresql/src/test/java/org/jiemamy/dialect/postgresql/PostgresqlDialectTest.java
===================================================================
--- artemis/trunk/org.jiemamy.dialect.postgresql/src/test/java/org/jiemamy/dialect/postgresql/PostgresqlDialectTest.java	2008-12-11 13:38:16 UTC (rev 2246)
+++ artemis/trunk/org.jiemamy.dialect.postgresql/src/test/java/org/jiemamy/dialect/postgresql/PostgresqlDialectTest.java	2008-12-11 13:56:19 UTC (rev 2247)
@@ -54,9 +54,8 @@
 import org.jiemamy.dialect.helper.JiemamyXADataSource;
 import org.jiemamy.dialect.postgresql.datatype.IntegerDataType;
 import org.jiemamy.dialect.postgresql.datatype.VarcharDataType;
-import org.jiemamy.dialect.test.DbConnectionTest;
 import org.jiemamy.exception.DataTypeNotFoundException;
-import org.jiemamy.extension.ReflectionDialectAccessStrategyForTest;
+import org.jiemamy.extension.ReflectionDialectAccessStrategy;
 import org.jiemamy.extension.dialect.DataTypeResolver;
 import org.jiemamy.extension.dialect.Dialect;
 import org.jiemamy.model.Artemis;
@@ -100,7 +99,7 @@
 	 */
 	@Before
 	public void setUp() throws Exception {
-		Jiemamy.init(Artemis.CORE, new ReflectionDialectAccessStrategyForTest());
+		Jiemamy.init(Artemis.CORE, new ReflectionDialectAccessStrategy());
 		rootModel = Jiemamy.newRootModel();
 		rootModel.setDialectId("org.jiemamy.dialect.postgresql.PostgresqlDialect");
 		
@@ -110,7 +109,7 @@
 			
 			public ClassLoader run() {
 				return URLClassLoader.newInstance(new URL[] {
-					DbConnectionTest.class.getResource("/postgresql-8.3-603.jdbc3.jar")
+					PostgresqlDialectTest.class.getResource("/postgresql-8.3-603.jdbc3.jar")
 				});
 			}
 		});

Modified: artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ModelInputStreamTest.java
===================================================================
--- artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ModelInputStreamTest.java	2008-12-11 13:38:16 UTC (rev 2246)
+++ artemis/trunk/org.jiemamy.serializer/src/test/java/org/jiemamy/serializer/ModelInputStreamTest.java	2008-12-11 13:56:19 UTC (rev 2247)
@@ -31,7 +31,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.jiemamy.extension.ReflectionDialectAccessStrategyForTest;
+import org.jiemamy.extension.ReflectionDialectAccessStrategy;
 import org.jiemamy.model.Artemis;
 import org.jiemamy.model.Jiemamy;
 import org.jiemamy.model.RootModel;
@@ -56,7 +56,7 @@
 	 */
 	@Before
 	public void setUp() throws Exception {
-		Jiemamy.init(Artemis.VIEW, new ReflectionDialectAccessStrategyForTest());
+		Jiemamy.init(Artemis.VIEW, new ReflectionDialectAccessStrategy());
 	}
 	
 	/**


Jiemamy-notify メーリングリストの案内
Back to archive index