Пример #1
0
  @Test
  public void noOperation_Execute() {
    // Arrange

    // Act
    Instruction.NO_OPERATION.execute(executionContext);

    // Assert
    mockery.assertIsSatisfied();
  }
Пример #2
0
  @Test
  public void decrement_Execute() {
    // Arrange
    mockery.checking(
        new Expectations() {
          {
            oneOf(executionContext).decrement();
          }
        });

    // Act
    Instruction.DECREMENT.execute(executionContext);

    // Assert
    mockery.assertIsSatisfied();
  }
Пример #3
0
  @Test
  public void testAndJumpBackward_Execute() {
    // Arrange
    mockery.checking(
        new Expectations() {
          {
            oneOf(executionContext).testAndJumpBackward();
          }
        });

    // Act
    Instruction.TEST_AND_JUMP_BACKWARD.execute(executionContext);

    // Assert
    mockery.assertIsSatisfied();
  }
Пример #4
0
  @Test
  public void output_Execute() {
    // Arrange
    mockery.checking(
        new Expectations() {
          {
            oneOf(executionContext).ouput();
          }
        });

    // Act
    Instruction.OUTPUT.execute(executionContext);

    // Assert
    mockery.assertIsSatisfied();
  }
Пример #5
0
  @Test
  public void moveBackward_Execute() {

    // Arrange
    mockery.checking(
        new Expectations() {
          {
            oneOf(executionContext).moveBackward();
          }
        });

    // Act
    Instruction.MOVE_BACKWARD.execute(executionContext);

    // Assert
    mockery.assertIsSatisfied();
  }