Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Cuccuru2014-06-20 11:41:54 +0000
committerCamille Letavernier2014-06-20 16:34:08 +0000
commite35e60c06d75cd77cb78b99e4d37e65edad91ce2 (patch)
treefbe51e768bc680beeab9e8d16cf851fcf4c226ae /extraplugins
parent573dfa1211aeed0ff59a07530bd33d2edad092d3 (diff)
downloadorg.eclipse.papyrus-e35e60c06d75cd77cb78b99e4d37e65edad91ce2.tar.gz
org.eclipse.papyrus-e35e60c06d75cd77cb78b99e4d37e65edad91ce2.tar.xz
org.eclipse.papyrus-e35e60c06d75cd77cb78b99e4d37e65edad91ce2.zip
405391: [Moka] Moka shall provide an implementation of the fUML
Execution Model https://bugs.eclipse.org/bugs/show_bug.cgi?id=405391 - Each addition in the report is displayed in the console.
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/Reporter.java1
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/TestReport.java104
2 files changed, 57 insertions, 48 deletions
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/Reporter.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/Reporter.java
index f93eba9cef7..76287f488f1 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/Reporter.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/Reporter.java
@@ -34,6 +34,7 @@ public class Reporter {
public static Reporter INSTANCE = new Reporter();
public boolean add(TestReport report) {
+ System.out.println(report);
return this.testReports.add(report);
}
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/TestReport.java b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/TestReport.java
index 37df4b5fe5d..20912edf45c 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/TestReport.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary/src/org/eclipse/papyrus/moka/fuml/assertionlibrary/reporting/TestReport.java
@@ -1,48 +1,56 @@
-/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
- * 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:
- * CEA LIST - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.moka.fuml.assertionlibrary.reporting;
-
-import org.eclipse.uml2.uml.Classifier;
-
-public class TestReport {
-
- protected Classifier context;
-
- protected String label;
-
- protected TestDecision verdict;
-
- protected Class<?> assertionType;
-
- public TestReport(Classifier context, String label, TestDecision verdict, Class<?> assertionType) {
- this.context = context;
- this.label = label;
- this.verdict = verdict;
- this.assertionType = assertionType;
- }
-
- public String getLabel() {
- return label;
- }
-
- public Classifier getContext() {
- return context;
- }
-
- public TestDecision getVerdict() {
- return verdict;
- }
-
- public Class<?> getAssertionType() {
- return this.assertionType;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.moka.fuml.assertionlibrary.reporting;
+
+import org.eclipse.uml2.uml.Classifier;
+
+public class TestReport {
+
+ protected Classifier context;
+
+ protected String label;
+
+ protected TestDecision verdict;
+
+ protected Class<?> assertionType;
+
+ public TestReport(Classifier context, String label, TestDecision verdict, Class<?> assertionType) {
+ this.context = context;
+ this.label = label;
+ this.verdict = verdict;
+ this.assertionType = assertionType;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public Classifier getContext() {
+ return context;
+ }
+
+ public TestDecision getVerdict() {
+ return verdict;
+ }
+
+ public Class<?> getAssertionType() {
+ return this.assertionType;
+ }
+
+ @Override
+ public String toString() {
+ String contextName = context == null ? "NULL" : (context.getQualifiedName() == null ? "NULL" : context.getQualifiedName()) ;
+ String s = "[TEST] " + this.label + " in " + contextName + " => " + verdict.toString() ;
+ return s;
+ }
+
+}

Back to the top