org.mozilla.zest.core.v1.ZestClientScreenshot.isEnabled()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(76)

本文整理了Java中org.mozilla.zest.core.v1.ZestClientScreenshot.isEnabled()方法的一些代码示例,展示了ZestClientScreenshot.isEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZestClientScreenshot.isEnabled()方法的具体详情如下:
包路径:org.mozilla.zest.core.v1.ZestClientScreenshot
类名称:ZestClientScreenshot
方法名:isEnabled

ZestClientScreenshot.isEnabled介绍

暂无

代码示例

代码示例来源: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 shouldBeEnabledByDefault() {
  // Given / When
  ZestClientScreenshot clientScreenshot = new ZestClientScreenshot();
  // Then
  assertEquals(true, clientScreenshot.isEnabled());
}

代码示例来源: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 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());
}

代码示例来源: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());
}

相关文章