Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2012-02-22 00:40:14 -0500
committerRyan D. Brooks2012-02-22 00:40:14 -0500
commit2e952df7696dd959044c6e015b9eb8d53c6d0f08 (patch)
treeb1edd856191916968d8e0fdde7cdc5b81a437baa /plugins/org.eclipse.osee.framework.core.server.test
parenta934b51cb7dfa1596239cfeb8c0fbf5ed442d2a2 (diff)
downloadorg.eclipse.osee-2e952df7696dd959044c6e015b9eb8d53c6d0f08.tar.gz
org.eclipse.osee-2e952df7696dd959044c6e015b9eb8d53c6d0f08.tar.xz
org.eclipse.osee-2e952df7696dd959044c6e015b9eb8d53c6d0f08.zip
feature[ats_VVMH0]: Integrate org.eclipse.osee.framework.core.server with X Server
Make services DS based Add org.eclipse.osee.framework.core.server into X Server Maven build
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.server.test')
-rw-r--r--plugins/org.eclipse.osee.framework.core.server.test/pom.xml30
-rw-r--r--plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/CoreServerTestSuite.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/CoreServerInternalTestSuite.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/mocks/MockLog.java105
5 files changed, 139 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.server.test/pom.xml b/plugins/org.eclipse.osee.framework.core.server.test/pom.xml
new file mode 100644
index 0000000000..67a844041e
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.server.test/pom.xml
@@ -0,0 +1,30 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.osee</groupId>
+ <artifactId>org.eclipse.osee.x.server.parent</artifactId>
+ <version>0.9.9-SNAPSHOT</version>
+ <relativePath>../../plugins/org.eclipse.osee.x.server.parent</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.osee.framework.core.server.test</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+ <name>OSEE Core Legacy Server Test - (Incubation)</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>org.eclipse.osee.framework.core.server.test</testSuite>
+ <testClass>org.eclipse.osee.framework.core.server.test.CoreServerTestSuite</testClass>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/CoreServerTestSuite.java b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/CoreServerTestSuite.java
index ef134f7f60..dbdc589485 100644
--- a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/CoreServerTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/CoreServerTestSuite.java
@@ -22,5 +22,5 @@ CoreServerInternalTestSuite.class, //
* @author Roberto E. Escobar
*/
public class CoreServerTestSuite {
- //
+ // Test Suite Class
}
diff --git a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/CoreServerInternalTestSuite.java b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/CoreServerInternalTestSuite.java
index 7e99b8af24..298df377e1 100644
--- a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/CoreServerInternalTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/CoreServerInternalTestSuite.java
@@ -23,5 +23,5 @@ BuildTypeIdentifierTest.class, //
* @author Roberto E. Escobar
*/
public class CoreServerInternalTestSuite {
- //
+ // Test Suite Class
}
diff --git a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java
index 1c3ebd5f94..25aa10a161 100644
--- a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java
+++ b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.framework.core.server.internal.session.Session;
import org.eclipse.osee.framework.core.server.internal.session.SessionCache;
import org.eclipse.osee.framework.core.server.internal.session.SessionFactory;
import org.eclipse.osee.framework.core.server.test.mocks.MockBuildTypeIdentifier;
+import org.eclipse.osee.framework.core.server.test.mocks.MockLog;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -47,7 +48,7 @@ public class SessionFactoryTest {
private final Date lastInteractionDate;
private final String lastInteractionDetails;
private final MockBuildTypeIdentifier typeIdentifier = new MockBuildTypeIdentifier();
- private final SessionFactory factory = new SessionFactory(typeIdentifier);
+ private final SessionFactory factory = new SessionFactory(new MockLog(), typeIdentifier);
public SessionFactoryTest(String guid, String userId, Date creationDate, String managedByServerId, String clientVersion, String clientMachineName, String clientAddress, int clientPort, Date lastInteractionDate, String lastInteractionDetails) {
super();
diff --git a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/mocks/MockLog.java b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/mocks/MockLog.java
new file mode 100644
index 0000000000..7521956dc8
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/mocks/MockLog.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.core.server.test.mocks;
+
+import org.eclipse.osee.logger.Log;
+
+/**
+ * @author Andrew M. Finkbeiner
+ */
+public class MockLog implements Log {
+
+ @Override
+ public boolean isTraceEnabled() {
+ return true;
+ }
+
+ @Override
+ public void trace(String format, Object... args) {
+ commonOut(format, args);
+ }
+
+ @Override
+ public void trace(Throwable th, String format, Object... args) {
+ commonOut(format, args);
+ }
+
+ @Override
+ public boolean isDebugEnabled() {
+ return true;
+ }
+
+ @Override
+ public void debug(String format, Object... args) {
+ commonOut(format, args);
+ }
+
+ @Override
+ public void debug(Throwable th, String format, Object... args) {
+ commonOut(th, format, args);
+ }
+
+ @Override
+ public boolean isInfoEnabled() {
+ return true;
+ }
+
+ @Override
+ public void info(String format, Object... args) {
+ commonOut(format, args);
+ }
+
+ @Override
+ public void info(Throwable th, String format, Object... args) {
+ commonOut(th, format, args);
+ }
+
+ @Override
+ public boolean isWarnEnabled() {
+ return true;
+ }
+
+ @Override
+ public void warn(String format, Object... args) {
+ commonOut(format, args);
+ }
+
+ @Override
+ public void warn(Throwable th, String format, Object... args) {
+ commonOut(th, format, args);
+ }
+
+ @Override
+ public boolean isErrorEnabled() {
+ return true;
+ }
+
+ @Override
+ public void error(String format, Object... args) {
+ commonOut(format, args);
+ }
+
+ @Override
+ public void error(Throwable th, String format, Object... args) {
+ commonOut(th, format, args);
+ }
+
+ private void commonOut(String format, Object... args) {
+ System.out.printf(format, args);
+ System.out.println();
+ }
+
+ private void commonOut(Throwable th, String format, Object... args) {
+ commonOut(format, args);
+ th.printStackTrace();
+ }
+
+}

Back to the top