diff options
author | Arnaud Cuccuru | 2014-06-20 11:41:54 +0000 |
---|---|---|
committer | Camille Letavernier | 2014-06-20 16:34:08 +0000 |
commit | e35e60c06d75cd77cb78b99e4d37e65edad91ce2 (patch) | |
tree | fbe51e768bc680beeab9e8d16cf851fcf4c226ae /extraplugins | |
parent | 573dfa1211aeed0ff59a07530bd33d2edad092d3 (diff) | |
download | org.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')
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; + } + +} |