NUnitEqualityComparer encapsulates NUnit's handling of equality tests between objects.
More...
|
bool | AreEqual (object x, object y, ref Tolerance tolerance) |
| Compares two objects for equality within a tolerance. More...
|
|
|
static NUnitEqualityComparer | Default [get] |
| Returns the default NUnitEqualityComparer More...
|
|
bool | IgnoreCase [get, set] |
| Gets and sets a flag indicating whether case should be ignored in determining equality. More...
|
|
bool | CompareAsCollection [get, set] |
| Gets and sets a flag indicating that arrays should be compared as collections, without regard to their shape. More...
|
|
IList< EqualityAdapter > | ExternalComparers [get] |
| Gets the list of external comparers to be used to test for equality. They are applied to members of collections, in place of NUnit's own logic. More...
|
|
IList< FailurePoint > | FailurePoints [get] |
| Gets the list of failure points for the last Match performed. The list consists of objects to be interpreted by the caller. This generally means that the caller may only make use of objects it has placed on the list at a particular depthy. More...
|
|
bool | WithSameOffset [get, set] |
| Flags the comparer to include DateTimeOffset.Offset property in comparison of two DateTimeOffset values. More...
|
|
|
EqualityAdapter | GetExternalComparer (object x, object y) |
|
bool | ArraysEqual (Array x, Array y, ref Tolerance tolerance) |
| Helper method to compare two arrays More...
|
|
bool | DictionariesEqual (IDictionary x, IDictionary y, ref Tolerance tolerance) |
|
bool | DictionaryEntriesEqual (DictionaryEntry x, DictionaryEntry y, ref Tolerance tolerance) |
|
bool | CollectionsEqual (ICollection x, ICollection y, ref Tolerance tolerance) |
|
bool | StringsEqual (string x, string y) |
|
bool | CharsEqual (char x, char y) |
|
bool | EnumerablesEqual (IEnumerable x, IEnumerable y, ref Tolerance tolerance) |
|
bool | StreamsEqual (Stream x, Stream y) |
|
NUnitEqualityComparer encapsulates NUnit's handling of equality tests between objects.
bool NUnit.Framework.Constraints.NUnitEqualityComparer.AreEqual |
( |
object |
x, |
|
|
object |
y, |
|
|
ref Tolerance |
tolerance |
|
) |
| |
|
inline |
Compares two objects for equality within a tolerance.
Referenced by NUnit.Framework.Constraints.EqualConstraint.ApplyTo< TActual >(), NUnit.Framework.Constraints.EqualityComparerTests.CanCompareArrayContainingSelfToSelf(), NUnit.Framework.Constraints.EqualityComparerTests.DifferentDirectoriesAreNotEqual(), NUnit.Framework.Constraints.EqualityComparerTests.EqualItems(), NUnit.Framework.Constraints.EqualityComparerTests.IEnumeratorIsDisposed(), NUnit.Framework.Constraints.EqualityComparerTests.IEquatableDifferentTypesSuccess_WhenActualImplementsIEquatable(), NUnit.Framework.Constraints.EqualityComparerTests.IEquatableDifferentTypesSuccess_WhenExpectedImplementsIEquatable(), NUnit.Framework.Constraints.EqualityComparerTests.IEquatableHasPrecedenceOverDefaultEquals(), NUnit.Framework.Constraints.EqualityComparerTests.IEquatableSuccess(), NUnit.Framework.Constraints.EqualityComparerTests.ReferenceEqualityHasPrecedenceOverIEquatable(), NUnit.Framework.Constraints.EqualityComparerTests.SameDirectoriesAreEqual(), NUnit.Framework.Constraints.EqualityComparerTests.SpecialFloatingPointValuesCompareAsEqual(), NUnit.Framework.Tests.Constraints.ToleranceTests.TestToleranceDefault(), NUnit.Framework.Tests.Constraints.ToleranceTests.TestToleranceExact(), and NUnit.Framework.Constraints.EqualityComparerTests.UnequalItems().
static bool NUnit.Framework.Constraints.NUnitEqualityComparer.FirstImplementsIEquatableOfSecond |
( |
Type |
first, |
|
|
Type |
second |
|
) |
| |
|
inlinestaticprivate |
static IList<Type> NUnit.Framework.Constraints.NUnitEqualityComparer.GetEquatableGenericArguments |
( |
Type |
type | ) |
|
|
inlinestaticprivate |
static bool NUnit.Framework.Constraints.NUnitEqualityComparer.InvokeFirstIEquatableEqualsSecond |
( |
object |
first, |
|
|
object |
second |
|
) |
| |
|
inlinestaticprivate |
static MethodInfo NUnit.Framework.Constraints.NUnitEqualityComparer.GetCorrectGenericEqualsMethod |
( |
Type |
first, |
|
|
Type |
second |
|
) |
| |
|
inlinestaticprivate |
EqualityAdapter NUnit.Framework.Constraints.NUnitEqualityComparer.GetExternalComparer |
( |
object |
x, |
|
|
object |
y |
|
) |
| |
|
inlineprivate |
bool NUnit.Framework.Constraints.NUnitEqualityComparer.ArraysEqual |
( |
Array |
x, |
|
|
Array |
y, |
|
|
ref Tolerance |
tolerance |
|
) |
| |
|
inlineprivate |
Helper method to compare two arrays
bool NUnit.Framework.Constraints.NUnitEqualityComparer.DictionariesEqual |
( |
IDictionary |
x, |
|
|
IDictionary |
y, |
|
|
ref Tolerance |
tolerance |
|
) |
| |
|
inlineprivate |
bool NUnit.Framework.Constraints.NUnitEqualityComparer.DictionaryEntriesEqual |
( |
DictionaryEntry |
x, |
|
|
DictionaryEntry |
y, |
|
|
ref Tolerance |
tolerance |
|
) |
| |
|
inlineprivate |
bool NUnit.Framework.Constraints.NUnitEqualityComparer.StringsEqual |
( |
string |
x, |
|
|
string |
y |
|
) |
| |
|
inlineprivate |
bool NUnit.Framework.Constraints.NUnitEqualityComparer.CharsEqual |
( |
char |
x, |
|
|
char |
y |
|
) |
| |
|
inlineprivate |
bool NUnit.Framework.Constraints.NUnitEqualityComparer.EnumerablesEqual |
( |
IEnumerable |
x, |
|
|
IEnumerable |
y, |
|
|
ref Tolerance |
tolerance |
|
) |
| |
|
inlineprivate |
static bool NUnit.Framework.Constraints.NUnitEqualityComparer.DirectoriesEqual |
( |
DirectoryInfo |
x, |
|
|
DirectoryInfo |
y |
|
) |
| |
|
inlinestaticprivate |
Method to compare two DirectoryInfo objects
- Parameters
-
x | first directory to compare |
y | second directory to compare |
- Returns
- true if equivalent, false if not
bool NUnit.Framework.Constraints.NUnitEqualityComparer.StreamsEqual |
( |
Stream |
x, |
|
|
Stream |
y |
|
) |
| |
|
inlineprivate |
bool NUnit.Framework.Constraints.NUnitEqualityComparer.caseInsensitive |
|
private |
If true, all string comparisons will ignore case
bool NUnit.Framework.Constraints.NUnitEqualityComparer.compareAsCollection |
|
private |
If true, arrays will be treated as collections, allowing those of different dimensions to be compared
Comparison objects used in comparisons for some constraints.
List<FailurePoint> NUnit.Framework.Constraints.NUnitEqualityComparer.failurePoints |
|
private |
List of points at which a failure occurred.
readonly int NUnit.Framework.Constraints.NUnitEqualityComparer.BUFFER_SIZE = 4096 |
|
staticprivate |
bool NUnit.Framework.Constraints.NUnitEqualityComparer.IgnoreCase |
|
getset |
Gets and sets a flag indicating whether case should be ignored in determining equality.
bool NUnit.Framework.Constraints.NUnitEqualityComparer.CompareAsCollection |
|
getset |
Gets and sets a flag indicating that arrays should be compared as collections, without regard to their shape.
IList<EqualityAdapter> NUnit.Framework.Constraints.NUnitEqualityComparer.ExternalComparers |
|
get |
IList<FailurePoint> NUnit.Framework.Constraints.NUnitEqualityComparer.FailurePoints |
|
get |
Gets the list of failure points for the last Match performed. The list consists of objects to be interpreted by the caller. This generally means that the caller may only make use of objects it has placed on the list at a particular depthy.
bool NUnit.Framework.Constraints.NUnitEqualityComparer.WithSameOffset |
|
getset |
Flags the comparer to include DateTimeOffset.Offset property in comparison of two DateTimeOffset values.
Using this modifier does not allow to use the Tolerance modifier.
The documentation for this class was generated from the following file: