Context-Dependent Rotten Green Assertion Test

Definition:

  • Tests contain multiple conditional branches with different assertions in each branch

Code Example:

@Test public void testCoGroupLambda(){
  CoGroupFunction<Tuple2<...>> f = (i1,i2,o) -> { } ;
  TypeInformation<?> ti = TypeExtractor.getCoGroupReturnTypes(f, . . . ) ;

  if (!(ti instanceof MissingTypeInfo)){
    assertTrue(ti.isTupleType());
    assertEquals(2, ti.getArity());
    . . .
  }

}

References:

Quality attributes

  • - Code Example

  • - Cause and Effect

  • - Frequency

  • - Refactoring