diff options
author | Brian Vosburgh | 2016-07-28 20:14:36 +0000 |
---|---|---|
committer | Brian Vosburgh | 2017-05-18 22:38:32 +0000 |
commit | da673999b9b25389911d0878fe8947e54ad30a42 (patch) | |
tree | e8d2bdea991d7c0b15f1993bd1bd73c89e0d1360 /common/tests | |
parent | 03e347b7483a21f5507863a94d30e18e3dd0ecd6 (diff) | |
download | webtools.dali-da673999b9b25389911d0878fe8947e54ad30a42.tar.gz webtools.dali-da673999b9b25389911d0878fe8947e54ad30a42.tar.xz webtools.dali-da673999b9b25389911d0878fe8947e54ad30a42.zip |
remove explicit aspect adapter return types
Diffstat (limited to 'common/tests')
-rw-r--r-- | common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/model/value/PropertyAspectAdapterTests.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/model/value/PropertyAspectAdapterTests.java b/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/model/value/PropertyAspectAdapterTests.java index 252e6ed62c..c37c7dc83d 100644 --- a/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/model/value/PropertyAspectAdapterTests.java +++ b/common/tests/org.eclipse.jpt.common.utility.tests/src/org/eclipse/jpt/common/utility/tests/internal/model/value/PropertyAspectAdapterTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2012 Oracle. All rights reserved. + * Copyright (c) 2007, 2016 Oracle. 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. @@ -26,7 +26,7 @@ import org.eclipse.jpt.common.utility.tests.internal.TestTools; public class PropertyAspectAdapterTests extends TestCase { private TestSubject subject1; private ModifiablePropertyValueModel<TestSubject> subjectHolder1; - private PropertyAspectAdapterXXXX<TestSubject, String> aa1; + private ModifiablePropertyValueModel<String> aa1; private PropertyChangeEvent event1; private PropertyChangeListener listener1; @@ -45,7 +45,7 @@ public class PropertyAspectAdapterTests extends TestCase { protected void setUp() throws Exception { super.setUp(); this.subject1 = new TestSubject("foo", "test subject 1"); - this.subjectHolder1 = new SimplePropertyValueModel<TestSubject> (this.subject1); + this.subjectHolder1 = new SimplePropertyValueModel<> (this.subject1); this.aa1 = this.buildAspectAdapter(this.subjectHolder1); this.listener1 = this.buildValueChangeListener1(); this.aa1.addPropertyChangeListener(PropertyValueModel.VALUE, this.listener1); @@ -54,7 +54,7 @@ public class PropertyAspectAdapterTests extends TestCase { this.subject2 = new TestSubject("bar", "test subject 2"); } - private PropertyAspectAdapterXXXX<TestSubject, String> buildAspectAdapter(PropertyValueModel<TestSubject> subjectHolder) { + private ModifiablePropertyValueModel<String> buildAspectAdapter(PropertyValueModel<TestSubject> subjectHolder) { return new PropertyAspectAdapterXXXX<TestSubject, String>(subjectHolder, TestSubject.NAME_PROPERTY) { // this is not a aspect adapter - the value is determined by the aspect name @Override @@ -191,24 +191,24 @@ public class PropertyAspectAdapterTests extends TestCase { } public void testHasListeners() { - assertTrue(this.aa1.hasAnyPropertyChangeListeners(PropertyValueModel.VALUE)); + assertTrue(((AbstractModel) this.aa1).hasAnyPropertyChangeListeners(PropertyValueModel.VALUE)); assertTrue(this.subject1.hasAnyPropertyChangeListeners(TestSubject.NAME_PROPERTY)); this.aa1.removePropertyChangeListener(PropertyValueModel.VALUE, this.listener1); assertFalse(this.subject1.hasAnyPropertyChangeListeners(TestSubject.NAME_PROPERTY)); - assertFalse(this.aa1.hasAnyPropertyChangeListeners(PropertyValueModel.VALUE)); + assertFalse(((AbstractModel) this.aa1).hasAnyPropertyChangeListeners(PropertyValueModel.VALUE)); ChangeListener listener2 = this.buildValueChangeListener1(); this.aa1.addChangeListener(listener2); - assertTrue(this.aa1.hasAnyPropertyChangeListeners(PropertyValueModel.VALUE)); + assertTrue(((AbstractModel) this.aa1).hasAnyPropertyChangeListeners(PropertyValueModel.VALUE)); assertTrue(this.subject1.hasAnyPropertyChangeListeners(TestSubject.NAME_PROPERTY)); this.aa1.removeChangeListener(listener2); assertFalse(this.subject1.hasAnyPropertyChangeListeners(TestSubject.NAME_PROPERTY)); - assertFalse(this.aa1.hasAnyPropertyChangeListeners(PropertyValueModel.VALUE)); + assertFalse(((AbstractModel) this.aa1).hasAnyPropertyChangeListeners(PropertyValueModel.VALUE)); } public void testMultipleAspectAdapter() { TestSubject testSubject = new TestSubject("fred", "husband"); - ModifiablePropertyValueModel<TestSubject> testSubjectHolder = new SimplePropertyValueModel<TestSubject>(testSubject); + ModifiablePropertyValueModel<TestSubject> testSubjectHolder = new SimplePropertyValueModel<>(testSubject); ModifiablePropertyValueModel<String> testAA = this.buildMultipleAspectAdapter(testSubjectHolder); PropertyChangeListener testListener = this.buildMultipleValueChangeListener(); testAA.addPropertyChangeListener(PropertyValueModel.VALUE, testListener); @@ -256,7 +256,7 @@ public class PropertyAspectAdapterTests extends TestCase { */ public void testCustomBuildValueWithNullSubject() { TestSubject customSubject = new TestSubject("fred", "laborer"); - ModifiablePropertyValueModel<TestSubject> customSubjectHolder = new SimplePropertyValueModel<TestSubject>(customSubject); + ModifiablePropertyValueModel<TestSubject> customSubjectHolder = new SimplePropertyValueModel<>(customSubject); ModifiablePropertyValueModel<String> customAA = this.buildCustomAspectAdapter(customSubjectHolder); PropertyChangeListener customListener = this.buildCustomValueChangeListener(); customAA.addPropertyChangeListener(PropertyValueModel.VALUE, customListener); |