コード例 #1
0
  /**
   * Meditate on changing the method signature to require at least one argument of the required type
   */
  @Koan
  public void reflectOnCallingAMethodThatRequiresAtLeastOneArgument() {

    int max = BrokenCompute.max(7, 8, 3, 4, 5);
    int maxUnderMeditation = 0;

    // (@[email protected])

    // (^_^)

    assertThat(maxUnderMeditation, is(max));
  }
コード例 #2
0
  /**
   * Meditate on calling a method that has been defined with a variable number of arguments of the
   * same type.
   */
  @Koan
  public void reflectOnCallingAMethodThatHasAVariableNumberOfArguments() {

    int max = BrokenCompute.max(7, 8, 3, 4, 5);
    int maxUnderMeditation = 0;

    // (@[email protected])

    // (^_^)

    assertThat(maxUnderMeditation, is(max));
  }