Android
junit.framework
public class

junit.framework.ComparisonFailure

java.lang.Object
java.lang.Throwable Serializable
java.lang.Error
junit.framework.AssertionFailedError
junit.framework.ComparisonFailure

Thrown when an assert equals for Strings failed. Inspired by a patch from Alex Chaffee mailto:alex@purpletech.com

Summary

Public Constructors

            ComparisonFailure(String message, String expected, String actual)
Constructs a comparison failure.

Public Methods

          String  getMessage()
Returns "..." in place of common prefix and "..." in place of common suffix between expected and actual.
Methods inherited from class java.lang.Throwable
Methods inherited from class java.lang.Object

Details

Public Constructors

public ComparisonFailure(String message, String expected, String actual)

Constructs a comparison failure.

Parameters

message the identifying message or null
expected the expected string value
actual the actual string value

Public Methods

public String getMessage()

Returns "..." in place of common prefix and "..." in place of common suffix between expected and actual.

Returns

  • String The receiver's message.

See Also

Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48