Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-06-20 18:47:35 -0400
committerRyan D. Brooks2011-06-20 18:47:35 -0400
commit1bbd3685a3bd141173b0e84fed61e7a026b85338 (patch)
tree2085ff96415d03b8b9d9a6742253f95e77b264e9 /plugins/org.eclipse.osee.ats.core.test
parent7600301ad0b762cd1298b899e805f5bd5832da59 (diff)
downloadorg.eclipse.osee-1bbd3685a3bd141173b0e84fed61e7a026b85338.tar.gz
org.eclipse.osee-1bbd3685a3bd141173b0e84fed61e7a026b85338.tar.xz
org.eclipse.osee-1bbd3685a3bd141173b0e84fed61e7a026b85338.zip
refactor: Cleanup and fix production tests
Diffstat (limited to 'plugins/org.eclipse.osee.ats.core.test')
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsCore_Production_Suite.java39
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsActionableItemToTeamDefinitionTest.java41
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_Demo_PT_Suite.java37
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_Production_PT_Suite.java37
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_Demo_PT_Suite.java37
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_Production_PT_Suite.java37
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsTeamDefintionToWorkflowTest.java43
7 files changed, 271 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsCore_Production_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsCore_Production_Suite.java
new file mode 100644
index 0000000000..97d5054c3f
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/AtsCore_Production_Suite.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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.ats.core;
+
+import org.eclipse.osee.ats.core.config.AtsCore_Config_Production_PT_Suite;
+import org.eclipse.osee.ats.core.workdef.AtsCore_WorkDef_Production_PT_Suite;
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({AtsCore_Config_Production_PT_Suite.class, AtsCore_WorkDef_Production_PT_Suite.class})
+/**
+ * This test suite contains tests that must be run as PDE Junit (PT) through test launch config
+ *
+ * @author Donald G. Dunne
+ */
+public class AtsCore_Production_Suite {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ System.out.println("\n\nBegin " + AtsCore_Production_Suite.class.getSimpleName());
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ System.out.println("End " + AtsCore_Production_Suite.class.getSimpleName());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsActionableItemToTeamDefinitionTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsActionableItemToTeamDefinitionTest.java
new file mode 100644
index 0000000000..928a9cd96e
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsActionableItemToTeamDefinitionTest.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.ats.core.config;
+
+import static org.junit.Assert.assertFalse;
+import java.util.Arrays;
+import org.eclipse.osee.ats.core.type.AtsArtifactTypes;
+import org.eclipse.osee.ats.core.util.AtsUtilCore;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AtsActionableItemToTeamDefinitionTest {
+
+ @org.junit.Test
+ public void testAtsActionableItemToTeamDefinition() throws Exception {
+ boolean error = false;
+ StringBuffer sb = new StringBuffer("Actionable Actionable Items with no Team Def associated:\n");
+ for (Artifact artifact : ArtifactQuery.getArtifactListFromType(AtsArtifactTypes.ActionableItem,
+ AtsUtilCore.getAtsBranch())) {
+ ActionableItemArtifact aia = (ActionableItemArtifact) artifact;
+ if (aia.isActionable()) {
+ if (TeamDefinitionManagerCore.getImpactedTeamDefs(Arrays.asList(aia)).isEmpty()) {
+ sb.append("[" + aia + "]");
+ error = true;
+ }
+ }
+ }
+ assertFalse(sb.toString(), error);
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_Demo_PT_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_Demo_PT_Suite.java
new file mode 100644
index 0000000000..5d4c055086
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_Demo_PT_Suite.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.ats.core.config;
+
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({AtsActionableItemToTeamDefinitionTest.class})
+/**
+ * This test suite contains tests that must be run against demo database as Plugin JUnit (PT)
+ *
+ * @author Donald G. Dunne
+ */
+public class AtsCore_Config_Demo_PT_Suite {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ System.out.println("\n\nBegin " + AtsCore_Config_Demo_PT_Suite.class.getSimpleName());
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ System.out.println("End " + AtsCore_Config_Demo_PT_Suite.class.getSimpleName());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_Production_PT_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_Production_PT_Suite.java
new file mode 100644
index 0000000000..eeb8e128ee
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/AtsCore_Config_Production_PT_Suite.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.ats.core.config;
+
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({AtsActionableItemToTeamDefinitionTest.class})
+/**
+ * This test suite contains tests that must be run against Production database as Plugin JUnit (PT)
+ *
+ * @author Donald G. Dunne
+ */
+public class AtsCore_Config_Production_PT_Suite {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ System.out.println("\n\nBegin " + AtsCore_Config_Production_PT_Suite.class.getSimpleName());
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ System.out.println("End " + AtsCore_Config_Production_PT_Suite.class.getSimpleName());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_Demo_PT_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_Demo_PT_Suite.java
new file mode 100644
index 0000000000..7aad974379
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_Demo_PT_Suite.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.ats.core.workdef;
+
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({AtsTeamDefintionToWorkflowTest.class})
+/**
+ * This test suite contains tests that must be run against demo database as Plugin JUnit (PT)
+ *
+ * @author Donald G. Dunne
+ */
+public class AtsCore_WorkDef_Demo_PT_Suite {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ System.out.println("\n\nBegin " + AtsCore_WorkDef_Demo_PT_Suite.class.getSimpleName());
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ System.out.println("End " + AtsCore_WorkDef_Demo_PT_Suite.class.getSimpleName());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_Production_PT_Suite.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_Production_PT_Suite.java
new file mode 100644
index 0000000000..53994ac45b
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsCore_WorkDef_Production_PT_Suite.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.ats.core.workdef;
+
+import org.eclipse.osee.framework.jdk.core.util.OseeProperties;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({AtsTeamDefintionToWorkflowTest.class})
+/**
+ * This test suite contains tests that must be run against Production database as Plugin JUnit (PT)
+ *
+ * @author Donald G. Dunne
+ */
+public class AtsCore_WorkDef_Production_PT_Suite {
+ @BeforeClass
+ public static void setUp() throws Exception {
+ OseeProperties.setIsInTest(true);
+ System.out.println("\n\nBegin " + AtsCore_WorkDef_Production_PT_Suite.class.getSimpleName());
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ System.out.println("End " + AtsCore_WorkDef_Production_PT_Suite.class.getSimpleName());
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsTeamDefintionToWorkflowTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsTeamDefintionToWorkflowTest.java
new file mode 100644
index 0000000000..b52e140931
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsTeamDefintionToWorkflowTest.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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.ats.core.workdef;
+
+import static org.junit.Assert.assertFalse;
+import org.eclipse.osee.ats.core.config.TeamDefinitionArtifact;
+import org.eclipse.osee.ats.core.type.AtsArtifactTypes;
+import org.eclipse.osee.ats.core.util.AtsUtilCore;
+import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AtsTeamDefintionToWorkflowTest {
+
+ @org.junit.Test
+ public void testTeamDefinitionToWorkflow() throws Exception {
+ boolean error = false;
+ StringBuffer sb = new StringBuffer("Actionable Team Definitions with no Work Definition:\n");
+ for (Artifact artifact : ArtifactQuery.getArtifactListFromType(AtsArtifactTypes.TeamDefinition,
+ AtsUtilCore.getAtsBranch())) {
+ TeamDefinitionArtifact teamDef = (TeamDefinitionArtifact) artifact;
+ if (teamDef.isActionable()) {
+ WorkDefinitionMatch match = teamDef.getWorkDefinition();
+ if (!match.isMatched()) {
+ sb.append("[" + teamDef + "]");
+ }
+ error = true;
+ }
+ }
+ assertFalse(sb.toString(), error);
+ }
+
+}

Back to the top