Author: mes
Date: 2010-09-10 16:06:17 -0700 (Fri, 10 Sep 2010)
New Revision: 21805
Modified:
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTunableInterceptorTest.java
Log:
added test verifying that an exception is thrown when setters are annotated and
not getters
Modified:
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTunableInterceptorTest.java
===================================================================
---
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTunableInterceptorTest.java
2010-09-10 23:03:29 UTC (rev 21804)
+++
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTunableInterceptorTest.java
2010-09-10 23:06:17 UTC (rev 21805)
@@ -105,6 +105,11 @@
interceptor.loadTunables(new Has2ProvidesGUIMethods());
}
+ @Test(expected=IllegalArgumentException.class)
+ public final void testSetterAnnotatedInsteadOfGetter() {
+ interceptor.loadTunables(new SetterAnnotatedInsteadOfGetter());
+ }
+
@Test
public final void testInheritedField() {
assertTrue( interceptor.hasTunables( new ExtendedFieldClass() )
);
@@ -168,7 +173,14 @@
public void setStuff() { }
}
+class SetterAnnotatedInsteadOfGetter {
+ public int getStuff() { return -1; }
+ @Tunable
+ public void setStuff(int i) { }
+}
+
+
class HasInvalidProvidesGUIMethod {
@ProvidesGUI
public void badReturnType() { }
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.