Code example for AssertionFailedError

0
    { 
      return; 
    } 
    if (expectedResult == null || receivedResult == null)
    { 
      throw new AssertionFailedError("Assertation failed: Expected " + expectedResult + ", but got " + receivedResult);
    } 
 
    if (expectedResult.compareTo(receivedResult) != 0)
    { 
      throw new AssertionFailedError("Assertation failed: Expected " + expectedResult + ", but got " + receivedResult);
    } 
  } 
}