本文整理了Java中org.mozilla.zest.core.v1.ZestClientScreenshot.setEnabled()
方法的一些代码示例,展示了ZestClientScreenshot.setEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZestClientScreenshot.setEnabled()
方法的具体详情如下:
包路径:org.mozilla.zest.core.v1.ZestClientScreenshot
类名称:ZestClientScreenshot
方法名:setEnabled
暂无
代码示例来源:origin: mozilla/zest
@Override
public ZestClientScreenshot deepCopy() {
ZestClientScreenshot copy =
new ZestClientScreenshot(getWindowHandle(), getFilePath(), getVariableName());
copy.setEnabled(isEnabled());
return copy;
}
代码示例来源:origin: mozilla/zest
@Test
public void shouldSetEnabled() {
// Given
boolean enabled = false;
ZestClientScreenshot clientScreenshot = new ZestClientScreenshot();
// When
clientScreenshot.setEnabled(enabled);
// Then
assertEquals(enabled, clientScreenshot.isEnabled());
}
代码示例来源:origin: mozilla/zest
@Test
public void shouldSerialiseAndDeserialise() {
// Given
ZestClientScreenshot original =
new ZestClientScreenshot("windowHandle", "/path", "variableName");
original.setEnabled(false);
// When
String serialisation = ZestJSON.toString(original);
ZestClientScreenshot deserialised =
(ZestClientScreenshot) ZestJSON.fromString(serialisation);
// Then
assertEquals(deserialised.getElementType(), original.getElementType());
assertEquals(deserialised.getWindowHandle(), original.getWindowHandle());
assertEquals(deserialised.getFilePath(), original.getFilePath());
assertEquals(deserialised.getVariableName(), original.getVariableName());
assertEquals(deserialised.isEnabled(), original.isEnabled());
}
代码示例来源:origin: mozilla/zest
@Test
public void shouldDeepCopy() throws Exception {
// Given
ZestClientScreenshot original =
new ZestClientScreenshot("windowHandle", "/path", "variableName");
original.setEnabled(false);
// When
ZestClientScreenshot copy = original.deepCopy();
// Then
assertTrue(copy != original);
assertEquals(copy.getElementType(), original.getElementType());
assertEquals(copy.getWindowHandle(), original.getWindowHandle());
assertEquals(copy.getFilePath(), original.getFilePath());
assertEquals(copy.getVariableName(), original.getVariableName());
assertEquals(copy.isEnabled(), original.isEnabled());
}
内容来源于网络,如有侵权,请联系作者删除!