Пример #1
0
  @And("^this script has a Print brick with$")
  public void script_has_a_print_brick(String text) {
    Sprite object = (Sprite) Cucumber.get(Cucumber.KEY_CURRENT_OBJECT);
    Script script = (Script) Cucumber.get(Cucumber.KEY_CURRENT_SCRIPT);

    if (outputStream == null) {
      outputStream = new ByteArrayOutputStream();
    }
    PrintBrick brick = new PrintBrick(object, text);
    brick.setOutputStream(outputStream);
    script.addBrick(brick);
  }
Пример #2
0
 @Override
 public Brick clone() {
   PrintBrick brick = new PrintBrick(sprite, text);
   brick.outputStream = this.outputStream;
   return brick;
 }
Пример #3
0
 @Override
 public Brick copyBrickForSprite(Sprite sprite, Script script) {
   PrintBrick copyBrick = (PrintBrick) clone();
   copyBrick.sprite = sprite;
   return copyBrick;
 }