Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/provider/EnumValueTest.java')
-rw-r--r--org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/provider/EnumValueTest.java70
1 files changed, 70 insertions, 0 deletions
diff --git a/org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/provider/EnumValueTest.java b/org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/provider/EnumValueTest.java
new file mode 100644
index 00000000..06473d33
--- /dev/null
+++ b/org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/provider/EnumValueTest.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Formal Mind GmbH and University of Dusseldorf.
+ * 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:
+ * Michael Jastram - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.rmf.reqif10.provider;
+
+import java.math.BigInteger;
+
+import junit.framework.Assert;
+
+import org.eclipse.rmf.pror.reqif10.util.ProrUtil;
+import org.eclipse.rmf.reqif10.EmbeddedValue;
+import org.eclipse.rmf.reqif10.EnumValue;
+import org.eclipse.rmf.reqif10.ReqIF10Factory;
+import org.eclipse.rmf.reqif10.ReqIF10Package;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * A test case for the model object '<em><b>Enum Value</b></em>'.
+ */
+public class EnumValueTest extends IdentifiableTest {
+
+ /**
+ * Returns the fixture for this Enum Value test case.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EnumValue getFixture() {
+ return (EnumValue)fixture;
+ }
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Before
+ public void setUpEnumValueTest() throws Exception {
+ setFixture(ReqIF10Factory.eINSTANCE.createEnumValue());
+ }
+
+ /**
+ * @see junit.framework.TestCase#tearDown()
+ */
+ @After
+ public void tearDownEnumValueTest() throws Exception {
+ setFixture(null);
+ }
+
+ @Test
+ public void testEmbeddedValueChangePropagation() {
+ EmbeddedValue value = ReqIF10Factory.eINSTANCE.createEmbeddedValue();
+ setViaCommand(getFixture(), ReqIF10Package.Literals.ENUM_VALUE__PROPERTIES, value);
+ ProrUtil.getItemProvider(adapterFactory, getFixture()).addListener(listener);
+ setViaCommand(value, ReqIF10Package.Literals.EMBEDDED_VALUE__KEY, new BigInteger("1"));
+ Assert.assertEquals(1, notifications.size());
+ setViaCommand(value, ReqIF10Package.Literals.EMBEDDED_VALUE__OTHER_CONTENT, "Other Content");
+ Assert.assertEquals(2, notifications.size());
+ }
+
+} //EnumValueTest

Back to the top