Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2011-04-06 22:52:01 +0000
committerRyan D. Brooks2011-04-06 22:52:01 +0000
commit02aa6e385ce16ec862833f51c6450742eb5cd5d1 (patch)
tree0c3fa06a08e3aee1f58b75e3cf233b7ece20378b /plugins/org.eclipse.osee.framework.logging.test
parentbcfa3fc82450d4adebd20b64543e7876ec543974 (diff)
downloadorg.eclipse.osee-02aa6e385ce16ec862833f51c6450742eb5cd5d1.tar.gz
org.eclipse.osee-02aa6e385ce16ec862833f51c6450742eb5cd5d1.tar.xz
org.eclipse.osee-02aa6e385ce16ec862833f51c6450742eb5cd5d1.zip
refactor[bgz_342089]: Create AllLoggingTestSuite
Diffstat (limited to 'plugins/org.eclipse.osee.framework.logging.test')
-rw-r--r--plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/AllLoggingTestSuite.java18
-rw-r--r--plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/SevereLogMonitorTest.java17
2 files changed, 12 insertions, 23 deletions
diff --git a/plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/AllLoggingTestSuite.java b/plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/AllLoggingTestSuite.java
index e04c200e204..9eff34637e2 100644
--- a/plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/AllLoggingTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/AllLoggingTestSuite.java
@@ -1,15 +1,15 @@
-/*******************************************************************************
- * Copyright (c) 2011 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
+/*
+ * Created on Apr 6, 2011
*
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
package org.eclipse.osee.framework.logging;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({SevereLogMonitorTest.class})
public class AllLoggingTestSuite {
// test suite
}
diff --git a/plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/SevereLogMonitorTest.java b/plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/SevereLogMonitorTest.java
index 44f0cef9fc7..7feb2b87f45 100644
--- a/plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/SevereLogMonitorTest.java
+++ b/plugins/org.eclipse.osee.framework.logging.test/src/org/eclipse/osee/framework/logging/SevereLogMonitorTest.java
@@ -18,24 +18,13 @@ import java.util.logging.Level;
*/
public class SevereLogMonitorTest {
- /*
- * @Before public void setup() throws Exception { assertTrue("Should be run on test or demo datbase.",
- * TestUtil.isDemoDb() || TestUtil.isTestDb()); }
- */
-
@org.junit.Test
public void testCatchingOfException() {
-
- boolean madeItInException = false;
SevereLoggingMonitor monitorLog = new SevereLoggingMonitor();
OseeLog.registerLoggerListener(monitorLog);
- try {
- throw new Exception("this is my test exception");
- } catch (Exception ex) {
- madeItInException = true;
- OseeLog.log(SevereLogMonitorTest.class, Level.SEVERE, "caught our exception in a junit", ex);
- }
- assertTrue(madeItInException);
+ Exception ex = new Exception("this is my test exception");
+ OseeLog.log(SevereLogMonitorTest.class, Level.SEVERE, "caught our exception in a junit", ex);
+ OseeLog.unregisterLoggerListener(monitorLog);
assertTrue(String.format("%d SevereLogs during test.", monitorLog.getAllLogs().size()),
monitorLog.getAllLogs().size() == 1);
}

Back to the top