Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/classification/TestCategory.java')
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/classification/TestCategory.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/classification/TestCategory.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/classification/TestCategory.java
new file mode 100644
index 00000000000..1ac992884da
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/classification/TestCategory.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.junit.utils.classification;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * Enumerates all available TestCategories
+ *
+ * @author Camille Letavernier
+ *
+ */
+public enum TestCategory {
+
+ /**
+ * Test methods annotated with {@link NotImplemented}
+ */
+ NotImplemented(NotImplemented.class),
+
+ /**
+ * Test methods annotated with {@link InvalidTest}
+ */
+ InvalidTest(InvalidTest.class),
+
+ /**
+ * Test methods without any classification-related annotation
+ */
+ Standard();
+
+ private Class<? extends Annotation> annotationClass;
+
+ private TestCategory() {
+ //Empty constructor for Standard
+ }
+
+ private TestCategory(Class<? extends Annotation> annotationClass) {
+ this.annotationClass = annotationClass;
+ }
+
+ public boolean match(Class<? extends Annotation> annotationClass) {
+ return annotationClass == this.annotationClass;
+ }
+
+}

Back to the top