本文整理汇总了Java中java.beans.Expression.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java Expression.setValue方法的具体用法?Java Expression.setValue怎么用?Java Expression.setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.beans.Expression
的用法示例。
在下文中一共展示了Expression.setValue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSetValue_UnboundNormal
import java.beans.Expression; //导入方法依赖的package包/类
public void testSetValue_UnboundNormal() throws Exception {
MockObject mo = new MockObject(false);
Expression t = new Expression(mo, "method", new Object[0]);
t.setValue(mo);
assertSame(mo, t.getValue());
MockObject.assertNotCalled();
}
示例2: testSetValue_UnboundNull
import java.beans.Expression; //导入方法依赖的package包/类
public void testSetValue_UnboundNull() throws Exception {
MockObject mo = new MockObject(false);
Expression t = new Expression(mo, "method", new Object[0]);
t.setValue(null);
assertSame(null, t.getValue());
MockObject.assertNotCalled();
}
示例3: testSetValue_Constructor
import java.beans.Expression; //导入方法依赖的package包/类
public void testSetValue_Constructor() throws Exception {
MockObject mo = new MockObject(false);
Expression t = new Expression(mo, mo, "method", new Object[0]);
assertSame(mo, t.getValue());
MockObject.assertNotCalled();
t.setValue(null);
assertSame(null, t.getValue());
MockObject.assertNotCalled();
}
示例4: testSetValue_Set
import java.beans.Expression; //导入方法依赖的package包/类
public void testSetValue_Set() throws Exception {
MockObject mo = new MockObject(false);
Expression t = new Expression(mo, "method", new Object[0]);
t.setValue(mo);
assertSame(mo, t.getValue());
MockObject.assertNotCalled();
t.setValue(null);
assertSame(null, t.getValue());
MockObject.assertNotCalled();
}
示例5: testSetValue_Evaluated
import java.beans.Expression; //导入方法依赖的package包/类
public void testSetValue_Evaluated() throws Exception {
MockObject mo = new MockObject(false);
Expression t = new Expression(mo, "method", new Object[0]);
assertEquals("method1", t.getValue());
MockObject.assertCalled("method1", new Object[0]);
t.setValue(mo);
assertSame(mo, t.getValue());
MockObject.assertNotCalled();
}
示例6: testGetValue_Set
import java.beans.Expression; //导入方法依赖的package包/类
public void testGetValue_Set() throws Exception {
MockObject mo = new MockObject(false);
Expression t = new Expression(mo, "method", new Object[0]);
t.setValue(mo);
assertSame(mo, t.getValue());
MockObject.assertNotCalled();
}