Changeset 100 for branches/omero
- Timestamp:
- 06/08/05 17:19:24 (4 years ago)
- Location:
- branches/omero
- Files:
-
- 3 added
- 2 removed
- 14 modified
- 6 copied
- 6 moved
-
components/client/project.xml (modified) (2 diffs)
-
components/client/test/org/openmicroscopy/omero/tests/client/OmeroGrinderTest.java (modified) (1 diff)
-
components/client/test/org/openmicroscopy/omero/tests/client/OmeroHierarchyBrowsingIntegrationTest.java (modified) (7 diffs)
-
components/client/test/org/openmicroscopy/omero/tests/client/OmeroServiceTest.java (deleted)
-
components/client/test/org/openmicroscopy/omero/tests/client/test.xml (modified) (1 diff)
-
components/common (moved) (moved from branches/omero/components/model)
-
components/common/.classpath (copied) (copied from branches/omero/components/model/.classpath) (1 diff)
-
components/common/.project (modified) (1 diff)
-
components/common/maven.xml (copied) (copied from branches/omero/components/model/maven.xml)
-
components/common/middlegen (copied) (copied from branches/omero/components/model/middlegen)
-
components/common/project.xml (copied) (copied from branches/omero/components/model/project.xml) (1 diff)
-
components/common/src (copied) (copied from branches/omero/components/model/src)
-
components/common/src/org/openmicroscopy/omero/exceptions (added)
-
components/common/src/org/openmicroscopy/omero/tests (added)
-
components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java (moved) (moved from branches/omero/components/client/test/org/openmicroscopy/omero/tests/client/AbstractOmeroHierarchyBrowserIntegrationTest.java) (1 diff)
-
components/common/src/org/openmicroscopy/omero/tests/OMEData.java (moved) (moved from branches/omero/components/client/test/org/openmicroscopy/omero/tests/client/OMEData.java) (1 diff)
-
components/common/src/org/openmicroscopy/omero/tests/OMEPerformanceData.java (moved) (moved from branches/omero/components/client/test/org/openmicroscopy/omero/tests/client/OMEPerformanceData.java) (1 diff)
-
components/common/src/org/openmicroscopy/omero/util (added)
-
components/common/src/org/openmicroscopy/omero/util/Utils.java (moved) (moved from branches/omero/components/client/test/org/openmicroscopy/omero/tests/client/Utils.java) (3 diffs)
-
components/server/itest (deleted)
-
components/server/project.properties (modified) (2 diffs)
-
components/server/project.xml (modified) (1 diff)
-
components/server/test/org/openmicroscopy/omero/server/itests (copied) (copied from branches/omero/components/server/itest/org/openmicroscopy/omero/server/itests)
-
components/server/test/org/openmicroscopy/omero/server/utests (moved) (moved from branches/omero/components/server/test/org/openmicroscopy/omero/server/tests)
-
components/shoola-adapter/.classpath (modified) (1 diff)
-
components/shoola-adapter/project.xml (modified) (1 diff)
-
components/test/.classpath (modified) (1 diff)
-
components/test/project.xml (modified) (1 diff)
-
components/test/src/org/openmicroscopy/shoola/env/data/t/GrinderTest.java (modified) (1 diff)
-
maven.xml (modified) (4 diffs)
-
project.properties (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/omero/components/client/project.xml
r98 r100 4 4 <extend>../../project.xml</extend> 5 5 <pomVersion>3</pomVersion> 6 < id>${pom.groupId}-client</id>6 <artifactId>${pom.groupId}-client</artifactId> 7 7 <name>OME Client Code</name> 8 8 <currentVersion>1.0</currentVersion> … … 12 12 <dependency> 13 13 <groupId>${pom.groupId}</groupId> 14 <artifactId>${pom.groupId}- model</artifactId>14 <artifactId>${pom.groupId}-common</artifactId> 15 15 <version>1.0</version> 16 </dependency>17 <dependency><!-- TODO: Make sure that nothing leaks!!! -->18 <groupId>${pom.groupId}</groupId>19 <artifactId>${pom.groupId}-server</artifactId>20 <version>1.0</version>21 <type>jar</type>22 16 </dependency> 23 17 <dependency> -
branches/omero/components/client/test/org/openmicroscopy/omero/tests/client/OmeroGrinderTest.java
r98 r100 3 3 */ 4 4 package org.openmicroscopy.omero.tests.client; 5 6 import org.openmicroscopy.omero.tests.AbstractOmeroHierarchyBrowserIntegrationTest; 7 import org.openmicroscopy.omero.tests.OMEData; 8 import org.openmicroscopy.omero.tests.OMEPerformanceData; 5 9 6 10 /** -
branches/omero/components/client/test/org/openmicroscopy/omero/tests/client/OmeroHierarchyBrowsingIntegrationTest.java
r98 r100 13 13 import org.openmicroscopy.omero.model.Image; 14 14 import org.openmicroscopy.omero.model.Project; 15 import org.openmicroscopy.omero.tests.AbstractOmeroHierarchyBrowserIntegrationTest; 16 import org.openmicroscopy.omero.tests.OMEData; 17 import org.openmicroscopy.omero.tests.OMEPerformanceData; 15 18 16 19 /** … … 20 23 extends 21 24 AbstractOmeroHierarchyBrowserIntegrationTest { 22 25 23 26 /** 24 27 * @see org.springframework.test.AbstractDependencyInjectionSpringContextTests#getConfigLocations() … … 38 41 public void testContainerCallWithWrongParameters(){ 39 42 try { 40 hb.loadPDIHierarchy(Object.class,1);43 getHb().loadPDIHierarchy(Object.class,1); 41 44 fail("loadPDIHierarchy(class,int) didn't choke on bad class."); 42 45 } catch (IllegalArgumentException iae){ … … 45 48 46 49 try { 47 hb.loadCGCIHierarchy(Object.class,1);50 getHb().loadCGCIHierarchy(Object.class,1); 48 51 fail("loadCGCIHierarchy(class,int) didn't choke on bad class."); 49 52 } catch (IllegalArgumentException iae){ … … 59 62 public void testNulls(){ 60 63 // Each method should return a null or an empty set as appropriate 61 //TODO hb.findCGCIHierarchies( );64 //TODO getHb().findCGCIHierarchies( ); 62 65 //TODO generate OMENullData(); and use it here. 63 66 //TODO OMEData toString(); … … 67 70 int nonExp = 0; // Non-existence experimenter ID 68 71 // 69 assertTrue(emptyColl, hb.findDatasetAnnotations(test).size()==0);70 assertTrue(emptyColl, hb.findDatasetAnnotations(new HashSet()).size()==0);72 assertTrue(emptyColl,getHb().findDatasetAnnotations(test).size()==0); 73 assertTrue(emptyColl,getHb().findDatasetAnnotations(new HashSet()).size()==0); 71 74 // 72 assertTrue(emptyColl, hb.findDatasetAnnotationsForExperimenter(test,nonExp).size()==0);73 assertTrue(emptyColl, hb.findDatasetAnnotationsForExperimenter(new HashSet(),nonExp).size()==0);75 assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(test,nonExp).size()==0); 76 assertTrue(emptyColl,getHb().findDatasetAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); 74 77 // 75 assertTrue(emptyColl, hb.findImageAnnotations(test).size()==0);76 assertTrue(emptyColl, hb.findImageAnnotations(new HashSet()).size()==0);78 assertTrue(emptyColl,getHb().findImageAnnotations(test).size()==0); 79 assertTrue(emptyColl,getHb().findImageAnnotations(new HashSet()).size()==0); 77 80 // 78 assertTrue(emptyColl, hb.findImageAnnotationsForExperimenter(test,nonExp).size()==0);79 assertTrue(emptyColl, hb.findImageAnnotationsForExperimenter(new HashSet(),nonExp).size()==0);81 assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(test,nonExp).size()==0); 82 assertTrue(emptyColl,getHb().findImageAnnotationsForExperimenter(new HashSet(),nonExp).size()==0); 80 83 // 81 assertTrue(emptyColl, hb.findPDIHierarchies(test).size()==0);82 assertTrue(emptyColl, hb.findPDIHierarchies(new HashSet()).size()==0);84 assertTrue(emptyColl,getHb().findPDIHierarchies(test).size()==0); 85 assertTrue(emptyColl,getHb().findPDIHierarchies(new HashSet()).size()==0); 83 86 // 84 assertNull(nullObj, hb.loadCGCIHierarchy(CategoryGroup.class, 0));85 assertNull(nullObj, hb.loadCGCIHierarchy(Category.class, 0));87 assertNull(nullObj,getHb().loadCGCIHierarchy(CategoryGroup.class, 0)); 88 assertNull(nullObj,getHb().loadCGCIHierarchy(Category.class, 0)); 86 89 // 87 assertNull(nullObj, hb.loadPDIHierarchy(Project.class, 0));88 assertNull(nullObj, hb.loadPDIHierarchy(Dataset.class, 0));90 assertNull(nullObj,getHb().loadPDIHierarchy(Project.class, 0)); 91 assertNull(nullObj,getHb().loadPDIHierarchy(Dataset.class, 0)); 89 92 } 90 93 … … 112 115 } 113 116 } 114 assertTrue("There should only be as many images as in the data.imagesPDI", test.size() == this. data.imgsPDI.size());117 assertTrue("There should only be as many images as in the data.imagesPDI", test.size() == this.getData().imgsPDI.size()); 115 118 // TODO Make sure joins aren't leaving anything out because of empties! 116 119 } -
branches/omero/components/client/test/org/openmicroscopy/omero/tests/client/test.xml
r98 r100 5 5 <!-- Add this config file to the getConfigLocations() of your tests 6 6 if you want data and interfaces injected --> 7 <bean id="data" class="org.openmicroscopy.omero.tests. client.OMEPerformanceData" init-method="init">7 <bean id="data" class="org.openmicroscopy.omero.tests.OMEPerformanceData" init-method="init"> 8 8 <property name="dataSource" ref="dataSource"/> 9 9 </bean> -
branches/omero/components/common/.classpath
r96 r100 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 3 <classpath> 3 <classpathentry kind="src" path="src"/> 4 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 5 <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.0.jar"/> 6 <classpathentry kind="output" path="target/classes"/> 4 <classpathentry excluding="" kind="src" path="src"> 5 </classpathentry> 6 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> 7 </classpathentry> 8 <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.1.jar"> 9 </classpathentry> 10 <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-mock-1.2.1.jar"> 11 </classpathentry> 12 <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"> 13 </classpathentry> 14 <classpathentry kind="var" path="MAVEN_REPO/hessian/jars/hessian-2.1.12.jar"> 15 </classpathentry> 16 <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.0.jar"> 17 </classpathentry> 18 <classpathentry kind="var" path="MAVEN_REPO/postgresql/jars/postgresql-7.4.1-jdbc3.jar"> 19 </classpathentry> 20 <classpathentry kind="output" path="target/classes"> 21 </classpathentry> 7 22 </classpath> -
branches/omero/components/common/.project
r48 r100 2 2 3 3 <projectDescription> 4 <name>omero- model</name>5 <comment> Model code generated from owl</comment>4 <name>omero-common</name> 5 <comment>Common code: Model code generated from middlegen</comment> 6 6 <projects> 7 7 </projects> -
branches/omero/components/common/project.xml
r96 r100 4 4 <extend>../../project.xml</extend> 5 5 <pomVersion>3</pomVersion> 6 <id>${pom.groupId}- model</id>7 <name>OME ModelObjects</name>6 <id>${pom.groupId}-common</id> 7 <name>OME Common Objects</name> 8 8 <currentVersion>1.0</currentVersion> 9 <package>org.openmicroscopy.omero .model</package>10 <description> Model code generated from middlegen</description>9 <package>org.openmicroscopy.omero</package> 10 <description>Common code: Model code generated from middlegen</description> 11 11 <dependencies> 12 <dependency> 13 <groupId>springframework</groupId> 14 <artifactId>spring</artifactId> 15 <version>1.2.1</version> 16 </dependency> 17 <dependency> 18 <groupId>springframework</groupId> 19 <artifactId>spring-mock</artifactId> 20 <version>1.2.1</version> 21 </dependency> 22 <dependency> 23 <groupId>junit</groupId> 24 <artifactId>junit</artifactId> 25 <version>3.8.1</version> 26 </dependency> 27 <dependency> 28 <groupId>hessian</groupId> 29 <artifactId>hessian</artifactId> 30 <version>2.1.12</version> 31 </dependency> 12 32 <dependency> 13 33 <groupId>commons-lang</groupId> -
branches/omero/components/common/src/org/openmicroscopy/omero/tests/AbstractOmeroHierarchyBrowserIntegrationTest.java
r98 r100 2 2 * Created on Feb 27, 2005 3 3 */ 4 package org.openmicroscopy.omero.tests .client;4 package org.openmicroscopy.omero.tests; 5 5 6 6 import org.springframework.test.AbstractDependencyInjectionSpringContextTests; -
branches/omero/components/common/src/org/openmicroscopy/omero/tests/OMEData.java
r98 r100 2 2 * Created on May 22, 2005 3 3 */ 4 package org.openmicroscopy.omero.tests .client;4 package org.openmicroscopy.omero.tests; 5 5 6 6 import java.util.ArrayList; -
branches/omero/components/common/src/org/openmicroscopy/omero/tests/OMEPerformanceData.java
r98 r100 2 2 * Created on May 22, 2005 3 3 */ 4 package org.openmicroscopy.omero.tests .client;4 package org.openmicroscopy.omero.tests; 5 5 6 6 import java.util.Random; -
branches/omero/components/common/src/org/openmicroscopy/omero/util/Utils.java
r98 r100 2 2 * Created on May 12, 2005 3 3 */ 4 package org.openmicroscopy.omero. tests.client;4 package org.openmicroscopy.omero.util; 5 5 6 6 import java.io.ByteArrayOutputStream; … … 12 12 import com.caucho.hessian.io.HessianOutput; 13 13 14 import net.sf.acegisecurity.Authentication; 15 import net.sf.acegisecurity.context.ContextHolder; 16 import net.sf.acegisecurity.context.security.SecureContext; 17 import net.sf.acegisecurity.context.security.SecureContextImpl; 18 import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken; 14 //TODO 15 //import net.sf.acegisecurity.Authentication; 16 //import net.sf.acegisecurity.context.ContextHolder; 17 //import net.sf.acegisecurity.context.security.SecureContext; 18 //import net.sf.acegisecurity.context.security.SecureContextImpl; 19 //import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken; 19 20 20 21 … … 66 67 } 67 68 68 public static void setUserAuth(){69 Authentication auth =70 new UsernamePasswordAuthenticationToken(71 "Josh","Moore");72 setAuth(auth);73 }74 75 public static void setAdminAuth(){76 Authentication auth =77 new UsernamePasswordAuthenticationToken(78 "admin","admin");79 setAuth(auth);80 }81 82 public static void setAuth(Authentication auth){83 SecureContext secureContext = new SecureContextImpl();84 secureContext.setAuthentication(auth);85 ContextHolder.setContext(secureContext);86 }69 // public static void setUserAuth(){ 70 // Authentication auth = 71 // new UsernamePasswordAuthenticationToken( 72 // "Josh","Moore"); 73 // setAuth(auth); 74 // } 75 // 76 // public static void setAdminAuth(){ 77 // Authentication auth = 78 // new UsernamePasswordAuthenticationToken( 79 // "admin","admin"); 80 // setAuth(auth); 81 // } 82 // 83 // public static void setAuth(Authentication auth){ 84 // SecureContext secureContext = new SecureContextImpl(); 85 // secureContext.setAuthentication(auth); 86 // ContextHolder.setContext(secureContext); 87 // } 87 88 } -
branches/omero/components/server/project.properties
r99 r100 1 omero.home=${basedir}/../.. 1 ########################################## 2 # WEBAPP : Allow the servlet context to be "omero" 3 ########################################## 2 4 maven.war.src=${basedir}/web 3 5 maven.multiproject.type=war 4 5 #6 # Allow the servlet context to be "omero"7 #8 6 maven.war.final.name=omero.war 9 7 maven.tomcat.war.context=/omero … … 13 11 14 12 # For groovy 15 maven.test.search.classdir = true 16 17 # For itests 18 maven.test.mode=unit 19 test.unit.includes = ** 20 test.unit.excludes = itest/** 21 test.integration.includes = itest/** 22 test.integration.excludes = test/** 13 #maven.test.search.classdir = true 23 14 24 15 # ------------------------------------------------------------------- 25 16 # jam:master goal properties. 26 17 # ------------------------------------------------------------------- 27 maven.jam.master.basedir=${omero.home}28 maven.jam.master.includes=${omero.hom}/components/*/project.xml29 maven.jam.master.excludes=30 maven.jam.master.ignoreFailures=false18 #maven.jam.master.basedir=${omero.home} 19 #maven.jam.master.includes=${omero.hom}/components/*/project.xml 20 #maven.jam.master.excludes= 21 #maven.jam.master.ignoreFailures=false 31 22 -
branches/omero/components/server/project.xml
r99 r100 243 243 <sourceDirectory>src</sourceDirectory> 244 244 <unitTestSourceDirectory>test</unitTestSourceDirectory> 245 <integrationUnitTestSourceDirectory>itest</integrationUnitTestSourceDirectory>246 245 <unitTest> 247 246 <includes> 248 <include>${basedir}/test/**/*Test.java</include> 249 <include>${basedir}/itest/**/*Test.java</include> 247 <include>**/*Test.java</include> 250 248 </includes> 251 249 </unitTest> -
branches/omero/components/shoola-adapter/.classpath
r96 r100 5 5 <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/> 6 6 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 7 <classpathentry kind="var" path="MAVEN_REPO/omero/jars/omero- model-1.0.jar"/>7 <classpathentry kind="var" path="MAVEN_REPO/omero/jars/omero-common-1.0.jar"/> 8 8 <classpathentry kind="var" path="MAVEN_REPO/omero/jars/omero-client-1.0.jar"/> 9 9 <classpathentry kind="var" path="MAVEN_REPO/springframework/jars/spring-1.2.1.jar"/> -
branches/omero/components/shoola-adapter/project.xml
r96 r100 12 12 <dependency> 13 13 <groupId>${pom.groupId}</groupId> 14 <artifactId>${pom.groupId}- model</artifactId>14 <artifactId>${pom.groupId}-common</artifactId> 15 15 <version>1.0</version> 16 16 </dependency> -
branches/omero/components/test/.classpath
r86 r100 6 6 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> 7 7 </classpathentry> 8 <classpathentry kind="var" path="MAVEN_REPO/omero/jars/omero- model-1.0.jar">8 <classpathentry kind="var" path="MAVEN_REPO/omero/jars/omero-common-1.0.jar"> 9 9 </classpathentry> 10 10 <classpathentry kind="var" path="MAVEN_REPO/omero/jars/omero-client-1.0.jar"> -
branches/omero/components/test/project.xml
r96 r100 12 12 <dependency> 13 13 <groupId>${pom.groupId}</groupId> 14 <artifactId>${pom.groupId}- model</artifactId>14 <artifactId>${pom.groupId}-common</artifactId> 15 15 <version>1.0</version> 16 16 </dependency> -
branches/omero/components/test/src/org/openmicroscopy/shoola/env/data/t/GrinderTest.java
r86 r100 36 36 37 37 //Application-internal dependencies 38 import org.openmicroscopy.omero.tests. client.OMEData;39 import org.openmicroscopy.omero.tests. client.OMEPerformanceData;38 import org.openmicroscopy.omero.tests.OMEData; 39 import org.openmicroscopy.omero.tests.OMEPerformanceData; 40 40 import org.openmicroscopy.shoola.env.data.DataManagementService; 41 41 import org.openmicroscopy.shoola.env.data.DataServicesTestCase; -
branches/omero/maven.xml
r98 r100 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" default="build"> 2 <project xmlns:j="jelly:core" xmlns:ant="jelly:ant" 3 xmlns:maven="jelly:maven" xmlns:u="jelly:util" default="help"> 4 5 <!-- Dependencies --> 6 <preGoal name="jar:jar"> 7 <attainGoal name="jam"/> 8 <attainGoal name="create-properties"/> 9 </preGoal> 10 <preGoal name="war:init"> 11 <attainGoal name="jam"/> 12 <attainGoal name="create-properties"/> 13 </preGoal> 14 <preGoal name="test:test"> 15 <attainGoal name="filterTests"/> 16 </preGoal> 17 18 <!-- Setup --> 19 <goal name="get-tomcat-plugin"> 20 <maven:property name="artifactId" defaultValue="maven-tomcat-plugin" /> 21 <maven:property name="groupId" defaultValue="codeczar-tomcat" /> 22 <maven:property name="version" defaultValue="1.1" /> 23 <attainGoal name="plugin:download"/> 24 </goal> 25 3 26 4 27 <!-- For calling from the top level --> … … 14 37 </goal> 15 38 39 16 40 <!-- From calling within a component --> 17 41 <goal name="create-properties"> 18 42 <ant:sequential> 43 <ant:mkdir dir="${maven.build.dest}"/> 19 44 <ant:propertyfile 20 45 comment=" Database and Server properties generated from build properties" … … 33 58 </goal> 34 59 35 <preGoal name="jar:jar">36 <attainGoal name="jam"/>37 <attainGoal name="create-properties"/>38 </preGoal>39 <preGoal name="war:init">40 <attainGoal name="jam"/>41 <attainGoal name="create-properties"/>42 </preGoal>43 44 60 <goal name="itest"> 45 61 <ant:ant … … 51 67 </goal> 52 68 53 <!-- Misc --> 54 <goal name="get-tomcat-plugin"> 55 <maven:property name="artifactId" defaultValue="maven-tomcat-plugin" /> 56 <maven:property name="groupId" defaultValue="codeczar-tomcat" /> 57 <maven:property name="version" defaultValue="1.1" /> 58 <attainGoal name="plugin:download"/> 59 </goal> 69 <goal name="filterTests"> 70 <j:set var="testModeX" value="${maven.test.mode}X" /> 71 <j:if test="${testModeX == 'X'}" > 72 <j:set var="maven.test.mode" value="all" /> 73 </j:if> 74 <echo>Running ${maven.test.mode} tests</echo> 75 <j:if test="${maven.test.mode != 'all'}" > 76 <j:set var="includeProp" value="test.${maven.test.mode}.includes" /> 77 <j:if test="${context.getVariable(includeProp) != null}"> 78 <u:tokenize var="patterns" delim=",">${context.getVariable(includeProp)}</u:tokenize> 79 <j:forEach var="pattern" items="${patterns}"> 80 <j:set var="dummy" value="${pom.build.unitTest.addInclude(pattern)}" /> 81 </j:forEach> 82 </j:if> 83 <j:set var="excludeProp" value="test.${maven.test.mode}.excludes" /> 84 <j:if test="${context.getVariable(excludeProp) != null}"> 85 <u:tokenize var="patterns" delim=",">${context.getVariable(excludeProp)}</u:tokenize>
