コード例 #1
0
  @Test(expected = UnexpectedInvocation.class)
  public void verifyAllInvocationsToSubclassMethods_whenNotVerified(final SubDependency mock2) {
    mock.prepare();
    mock2.getValue();

    new FullVerificationsInOrder(1, mock2.getClass()) {
      {
        mock.prepare();
      }
    };
  }
コード例 #2
0
  @Test
  public void verifyAllInvocationsToSubclassMethods(final SubDependency mock2) {
    mock.prepare();
    mock2.getValue();

    new FullVerifications(1, mock2.getClass()) {
      {
        mock2.getValue();
      }
    };
  }