summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/monitor/src/test
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-18 03:17:59 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-18 03:17:59 +0000
commit98011c13256a40a0560412e12dbb9bddc1f3f5bc (patch)
treecb2e58be707a9c274975f147ccb9ab1ddc7d94b6 /java/sca/modules/monitor/src/test
parent3028493cf2dde16de1090e7be4790b60c6ea8cea (diff)
Reformat the code
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@785883 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/monitor/src/test')
-rw-r--r--java/sca/modules/monitor/src/test/java/org/apache/tuscany/sca/monitor/MonitorTestCase.java74
1 files changed, 39 insertions, 35 deletions
diff --git a/java/sca/modules/monitor/src/test/java/org/apache/tuscany/sca/monitor/MonitorTestCase.java b/java/sca/modules/monitor/src/test/java/org/apache/tuscany/sca/monitor/MonitorTestCase.java
index 4380e32f99..6e5fcd9015 100644
--- a/java/sca/modules/monitor/src/test/java/org/apache/tuscany/sca/monitor/MonitorTestCase.java
+++ b/java/sca/modules/monitor/src/test/java/org/apache/tuscany/sca/monitor/MonitorTestCase.java
@@ -30,63 +30,67 @@ import org.junit.Test;
* @version $Rev$ $Date$
*/
public class MonitorTestCase {
-
+
private static MonitorFactory monitorFactory;
-
+
@BeforeClass
public static void init() throws Exception {
- monitorFactory = new DefaultMonitorFactory();
+ monitorFactory = new DefaultMonitorFactory();
}
-
+
@AfterClass
public static void destroy() throws Exception {
monitorFactory = null;
}
-
+
@Test
- public void testCreateProblem() throws Exception {
+ public void testCreateProblem() throws Exception {
String dummyModelObject = "DUMMY MODEL OBJECT";
-
+
Monitor monitor = monitorFactory.createMonitor();
-
+
Problem problem = null;
-
- problem = monitor.createProblem(this.getClass().getName(),
- "tuscany-monitor-test-messages",
- Severity.WARNING,
- dummyModelObject,
- "MESSAGE1" );
+
+ problem =
+ monitor.createProblem(this.getClass().getName(),
+ "tuscany-monitor-test-messages",
+ Severity.WARNING,
+ dummyModelObject,
+ "MESSAGE1");
monitor.problem(problem);
-
+
String param = "Some Parameter";
-
- problem = monitor.createProblem(this.getClass().getName(),
- "tuscany-monitor-test-messages",
- Severity.WARNING,
- dummyModelObject,
+
+ problem =
+ monitor.createProblem(this.getClass().getName(),
+ "tuscany-monitor-test-messages",
+ Severity.WARNING,
+ dummyModelObject,
"MESSAGE2",
param);
monitor.problem(problem);
-
- problem = monitor.createProblem(this.getClass().getName(),
- "tuscany-monitor-test-messages",
- Severity.WARNING,
- dummyModelObject,
+
+ problem =
+ monitor.createProblem(this.getClass().getName(),
+ "tuscany-monitor-test-messages",
+ Severity.WARNING,
+ dummyModelObject,
"MESSAGE3",
- 8,
- 9,
+ 8,
+ 9,
4);
monitor.problem(problem);
-
+
Exception ex = new IllegalStateException("TEST_MESSAGE");
-
- problem = monitor.createProblem(this.getClass().getName(),
- "tuscany-monitor-test-messages",
- Severity.ERROR,
- dummyModelObject,
+
+ problem =
+ monitor.createProblem(this.getClass().getName(),
+ "tuscany-monitor-test-messages",
+ Severity.ERROR,
+ dummyModelObject,
"MESSAGE4",
ex);
- monitor.problem(problem);
-
+ monitor.problem(problem);
+
}
}