Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Jastram2012-10-25 14:31:36 +0000
committerMichael Jastram2012-10-25 14:31:36 +0000
commitdb783c1003d31f694a69d2378e0485181a3a34d1 (patch)
treee3cb2fb042525aa2ffc8e385c44a18867782878e /org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/configuration/tests/ColumnTest.java
parent05c84b6a10606c110b19e1080fe3789bb0a341a0 (diff)
downloadorg.eclipse.rmf-db783c1003d31f694a69d2378e0485181a3a34d1.tar.gz
org.eclipse.rmf-db783c1003d31f694a69d2378e0485181a3a34d1.tar.xz
org.eclipse.rmf-db783c1003d31f694a69d2378e0485181a3a34d1.zip
Step 3 package name refactoring
Diffstat (limited to 'org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/configuration/tests/ColumnTest.java')
-rw-r--r--org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/configuration/tests/ColumnTest.java81
1 files changed, 81 insertions, 0 deletions
diff --git a/org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/configuration/tests/ColumnTest.java b/org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/configuration/tests/ColumnTest.java
new file mode 100644
index 00000000..7c1fe986
--- /dev/null
+++ b/org.eclipse.rmf.reqif10.pror.tests/src/org/eclipse/rmf/reqif10/configuration/tests/ColumnTest.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.configuration.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.rmf.reqif10.pror.configuration.Column;
+import org.eclipse.rmf.reqif10.pror.configuration.ConfigurationFactory;
+import org.eclipse.rmf.reqif10.pror.configuration.ConfigurationPackage;
+import org.eclipse.rmf.reqif10.pror.configuration.ProrSpecViewConfiguration;
+import org.eclipse.rmf.reqif10.pror.testframework.AbstractItemProviderTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * A test case for the model object '<em><b>Column</b></em>'.
+ */
+public class ColumnTest extends AbstractItemProviderTest {
+
+ /**
+ * The fixture for this Column test case.
+ */
+ protected Column fixture = null;
+
+ /**
+ * Sets the fixture for this Column test case.
+ */
+ protected void setFixture(Column fixture) {
+ this.fixture = fixture;
+ }
+
+ /**
+ * Returns the fixture for this Column test case.
+ */
+ protected Column getFixture() {
+ return fixture;
+ }
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Before
+ public void setUp() throws Exception {
+ setFixture(ConfigurationFactory.eINSTANCE.createColumn());
+ }
+
+ /**
+ * @see junit.framework.TestCase#tearDown()
+ */
+ @After
+ public void tearDown() throws Exception {
+ setFixture(null);
+ }
+
+ @Test
+ public void testLabelNotification() throws Exception {
+ ProrSpecViewConfiguration specViewConfig = ConfigurationFactory.eINSTANCE
+ .createProrSpecViewConfiguration();
+ specViewConfig.getColumns().add(fixture);
+ ItemProviderAdapter itemProvider = getItemProvider(specViewConfig);
+ itemProvider.addListener(listener);
+ setViaCommand(fixture, ConfigurationPackage.Literals.COLUMN__LABEL, "new label");
+ assertEquals(1, notifications.size());
+ assertTrue(notifications.get(0) instanceof ViewerNotification);
+ assertTrue(((ViewerNotification)notifications.get(0)).isLabelUpdate());
+ }
+
+} //ColumnTest

Back to the top