C# 클래스 NUnit.Framework.CollectionAssert

파일 보기 프로젝트 열기: nunit/nunit 1 사용 예제들

공개 메소드들

메소드 설명
AllItemsAreInstancesOfType ( IEnumerable collection, Type expectedType ) : void

Asserts that all items contained in collection are of the type specified by expectedType.

AllItemsAreInstancesOfType ( IEnumerable collection, Type expectedType, string message ) : void

Asserts that all items contained in collection are of the type specified by expectedType.

AllItemsAreNotNull ( IEnumerable collection ) : void

Asserts that all items contained in collection are not equal to null.

AllItemsAreNotNull ( IEnumerable collection, string message ) : void

Asserts that all items contained in collection are not equal to null.

AllItemsAreUnique ( IEnumerable collection ) : void

Ensures that every object contained in collection exists within the collection once and only once.

AllItemsAreUnique ( IEnumerable collection, string message ) : void

Ensures that every object contained in collection exists within the collection once and only once.

AreEqual ( IEnumerable expected, IEnumerable actual ) : void

Asserts that expected and actual are exactly equal. The collections must have the same count, and contain the exact same objects in the same order.

AreEqual ( IEnumerable expected, IEnumerable actual, IComparer comparer ) : void

Asserts that expected and actual are exactly equal. The collections must have the same count, and contain the exact same objects in the same order. If comparer is not null then it will be used to compare the objects.

AreEqual ( IEnumerable expected, IEnumerable actual, IComparer comparer, string message ) : void

Asserts that expected and actual are exactly equal. The collections must have the same count, and contain the exact same objects in the same order. If comparer is not null then it will be used to compare the objects.

AreEqual ( IEnumerable expected, IEnumerable actual, string message ) : void

Asserts that expected and actual are exactly equal. The collections must have the same count, and contain the exact same objects in the same order.

AreEquivalent ( IEnumerable expected, IEnumerable actual ) : void

Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order.

AreEquivalent ( IEnumerable expected, IEnumerable actual, string message ) : void

Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order.

AreNotEqual ( IEnumerable expected, IEnumerable actual ) : void

Asserts that expected and actual are not exactly equal.

AreNotEqual ( IEnumerable expected, IEnumerable actual, IComparer comparer ) : void

Asserts that expected and actual are not exactly equal. If comparer is not null then it will be used to compare the objects.

AreNotEqual ( IEnumerable expected, IEnumerable actual, IComparer comparer, string message ) : void

Asserts that expected and actual are not exactly equal. If comparer is not null then it will be used to compare the objects.

AreNotEqual ( IEnumerable expected, IEnumerable actual, string message ) : void

Asserts that expected and actual are not exactly equal.

AreNotEquivalent ( IEnumerable expected, IEnumerable actual ) : void

Asserts that expected and actual are not equivalent.

AreNotEquivalent ( IEnumerable expected, IEnumerable actual, string message ) : void

Asserts that expected and actual are not equivalent.

Contains ( IEnumerable collection, Object actual ) : void

Asserts that collection contains actual as an item.

Contains ( IEnumerable collection, Object actual, string message ) : void

Asserts that collection contains actual as an item.

DoesNotContain ( IEnumerable collection, Object actual ) : void

Asserts that collection does not contain actual as an item.

DoesNotContain ( IEnumerable collection, Object actual, string message ) : void

Asserts that collection does not contain actual as an item.

IsEmpty ( IEnumerable collection ) : void

Assert that an array,list or other collection is empty

IsEmpty ( IEnumerable collection, string message ) : void

Assert that an array, list or other collection is empty

IsNotEmpty ( IEnumerable collection ) : void

Assert that an array,list or other collection is empty

IsNotEmpty ( IEnumerable collection, string message ) : void

Assert that an array, list or other collection is empty

IsNotSubsetOf ( IEnumerable subset, IEnumerable superset ) : void

Asserts that the superset does not contain the subset

IsNotSubsetOf ( IEnumerable subset, IEnumerable superset, string message ) : void

Asserts that the superset does not contain the subset

IsNotSupersetOf ( IEnumerable superset, IEnumerable subset ) : void

Asserts that the subset does not contain the superset

IsNotSupersetOf ( IEnumerable superset, IEnumerable subset, string message ) : void

Asserts that the subset does not contain the superset

IsOrdered ( IEnumerable collection ) : void

Assert that an array, list or other collection is ordered

IsOrdered ( IEnumerable collection, IComparer comparer ) : void

Assert that an array, list or other collection is ordered

IsOrdered ( IEnumerable collection, IComparer comparer, string message ) : void

Assert that an array, list or other collection is ordered

IsOrdered ( IEnumerable collection, string message ) : void

Assert that an array, list or other collection is ordered

IsSubsetOf ( IEnumerable subset, IEnumerable superset ) : void

Asserts that the superset contains the subset.

IsSubsetOf ( IEnumerable subset, IEnumerable superset, string message ) : void

Asserts that the superset contains the subset.

IsSupersetOf ( IEnumerable superset, IEnumerable subset ) : void

Asserts that the subset contains the superset.

IsSupersetOf ( IEnumerable superset, IEnumerable subset, string message ) : void

Asserts that the subset contains the superset.

ReferenceEquals ( object a, object b ) : void

DO NOT USE! The ReferenceEquals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function.

비공개 메소드들

메소드 설명
Equals ( object a, object b ) : bool

메소드 상세

AllItemsAreInstancesOfType() 공개 정적인 메소드

Asserts that all items contained in collection are of the type specified by expectedType.
public static AllItemsAreInstancesOfType ( IEnumerable collection, Type expectedType ) : void
collection IEnumerable IEnumerable containing objects to be considered
expectedType Type System.Type that all objects in collection must be instances of
리턴 void

AllItemsAreInstancesOfType() 공개 정적인 메소드

Asserts that all items contained in collection are of the type specified by expectedType.
public static AllItemsAreInstancesOfType ( IEnumerable collection, Type expectedType, string message ) : void
collection IEnumerable IEnumerable containing objects to be considered
expectedType Type System.Type that all objects in collection must be instances of
message string The message that will be displayed on failure
리턴 void

AllItemsAreNotNull() 공개 정적인 메소드

Asserts that all items contained in collection are not equal to null.
public static AllItemsAreNotNull ( IEnumerable collection ) : void
collection IEnumerable IEnumerable containing objects to be considered
리턴 void

AllItemsAreNotNull() 공개 정적인 메소드

Asserts that all items contained in collection are not equal to null.
public static AllItemsAreNotNull ( IEnumerable collection, string message ) : void
collection IEnumerable IEnumerable of objects to be considered
message string The message that will be displayed on failure
리턴 void

AllItemsAreUnique() 공개 정적인 메소드

Ensures that every object contained in collection exists within the collection once and only once.
public static AllItemsAreUnique ( IEnumerable collection ) : void
collection IEnumerable IEnumerable of objects to be considered
리턴 void

AllItemsAreUnique() 공개 정적인 메소드

Ensures that every object contained in collection exists within the collection once and only once.
public static AllItemsAreUnique ( IEnumerable collection, string message ) : void
collection IEnumerable IEnumerable of objects to be considered
message string The message that will be displayed on failure
리턴 void

AreEqual() 공개 정적인 메소드

Asserts that expected and actual are exactly equal. The collections must have the same count, and contain the exact same objects in the same order.
public static AreEqual ( IEnumerable expected, IEnumerable actual ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
리턴 void

AreEqual() 공개 정적인 메소드

Asserts that expected and actual are exactly equal. The collections must have the same count, and contain the exact same objects in the same order. If comparer is not null then it will be used to compare the objects.
public static AreEqual ( IEnumerable expected, IEnumerable actual, IComparer comparer ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
comparer IComparer The IComparer to use in comparing objects from each IEnumerable
리턴 void

AreEqual() 공개 정적인 메소드

Asserts that expected and actual are exactly equal. The collections must have the same count, and contain the exact same objects in the same order. If comparer is not null then it will be used to compare the objects.
public static AreEqual ( IEnumerable expected, IEnumerable actual, IComparer comparer, string message ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
comparer IComparer The IComparer to use in comparing objects from each IEnumerable
message string The message that will be displayed on failure
리턴 void

AreEqual() 공개 정적인 메소드

Asserts that expected and actual are exactly equal. The collections must have the same count, and contain the exact same objects in the same order.
public static AreEqual ( IEnumerable expected, IEnumerable actual, string message ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
message string The message that will be displayed on failure
리턴 void

AreEquivalent() 공개 정적인 메소드

Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order.
public static AreEquivalent ( IEnumerable expected, IEnumerable actual ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
리턴 void

AreEquivalent() 공개 정적인 메소드

Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order.
public static AreEquivalent ( IEnumerable expected, IEnumerable actual, string message ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
message string The message that will be displayed on failure
리턴 void

AreNotEqual() 공개 정적인 메소드

Asserts that expected and actual are not exactly equal.
public static AreNotEqual ( IEnumerable expected, IEnumerable actual ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
리턴 void

AreNotEqual() 공개 정적인 메소드

Asserts that expected and actual are not exactly equal. If comparer is not null then it will be used to compare the objects.
public static AreNotEqual ( IEnumerable expected, IEnumerable actual, IComparer comparer ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
comparer IComparer The IComparer to use in comparing objects from each IEnumerable
리턴 void

AreNotEqual() 공개 정적인 메소드

Asserts that expected and actual are not exactly equal. If comparer is not null then it will be used to compare the objects.
public static AreNotEqual ( IEnumerable expected, IEnumerable actual, IComparer comparer, string message ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
comparer IComparer The IComparer to use in comparing objects from each IEnumerable
message string The message that will be displayed on failure
리턴 void

AreNotEqual() 공개 정적인 메소드

Asserts that expected and actual are not exactly equal.
public static AreNotEqual ( IEnumerable expected, IEnumerable actual, string message ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
message string The message that will be displayed on failure
리턴 void

AreNotEquivalent() 공개 정적인 메소드

Asserts that expected and actual are not equivalent.
public static AreNotEquivalent ( IEnumerable expected, IEnumerable actual ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
리턴 void

AreNotEquivalent() 공개 정적인 메소드

Asserts that expected and actual are not equivalent.
public static AreNotEquivalent ( IEnumerable expected, IEnumerable actual, string message ) : void
expected IEnumerable The first IEnumerable of objects to be considered
actual IEnumerable The second IEnumerable of objects to be considered
message string The message that will be displayed on failure
리턴 void

Contains() 공개 정적인 메소드

Asserts that collection contains actual as an item.
public static Contains ( IEnumerable collection, Object actual ) : void
collection IEnumerable IEnumerable of objects to be considered
actual Object Object to be found within collection
리턴 void

Contains() 공개 정적인 메소드

Asserts that collection contains actual as an item.
public static Contains ( IEnumerable collection, Object actual, string message ) : void
collection IEnumerable IEnumerable of objects to be considered
actual Object Object to be found within collection
message string The message that will be displayed on failure
리턴 void

DoesNotContain() 공개 정적인 메소드

Asserts that collection does not contain actual as an item.
public static DoesNotContain ( IEnumerable collection, Object actual ) : void
collection IEnumerable IEnumerable of objects to be considered
actual Object Object that cannot exist within collection
리턴 void

DoesNotContain() 공개 정적인 메소드

Asserts that collection does not contain actual as an item.
public static DoesNotContain ( IEnumerable collection, Object actual, string message ) : void
collection IEnumerable IEnumerable of objects to be considered
actual Object Object that cannot exist within collection
message string The message that will be displayed on failure
리턴 void

IsEmpty() 공개 정적인 메소드

Assert that an array,list or other collection is empty
public static IsEmpty ( IEnumerable collection ) : void
collection IEnumerable An array, list or other collection implementing IEnumerable
리턴 void

IsEmpty() 공개 정적인 메소드

Assert that an array, list or other collection is empty
public static IsEmpty ( IEnumerable collection, string message ) : void
collection IEnumerable An array, list or other collection implementing IEnumerable
message string The message to be displayed on failure
리턴 void

IsNotEmpty() 공개 정적인 메소드

Assert that an array,list or other collection is empty
public static IsNotEmpty ( IEnumerable collection ) : void
collection IEnumerable An array, list or other collection implementing IEnumerable
리턴 void

IsNotEmpty() 공개 정적인 메소드

Assert that an array, list or other collection is empty
public static IsNotEmpty ( IEnumerable collection, string message ) : void
collection IEnumerable An array, list or other collection implementing IEnumerable
message string The message to be displayed on failure
리턴 void

IsNotSubsetOf() 공개 정적인 메소드

Asserts that the superset does not contain the subset
public static IsNotSubsetOf ( IEnumerable subset, IEnumerable superset ) : void
subset IEnumerable The IEnumerable subset to be considered
superset IEnumerable The IEnumerable superset to be considered
리턴 void

IsNotSubsetOf() 공개 정적인 메소드

Asserts that the superset does not contain the subset
public static IsNotSubsetOf ( IEnumerable subset, IEnumerable superset, string message ) : void
subset IEnumerable The IEnumerable subset to be considered
superset IEnumerable The IEnumerable superset to be considered
message string The message that will be displayed on failure
리턴 void

IsNotSupersetOf() 공개 정적인 메소드

Asserts that the subset does not contain the superset
public static IsNotSupersetOf ( IEnumerable superset, IEnumerable subset ) : void
superset IEnumerable The IEnumerable superset to be considered
subset IEnumerable The IEnumerable subset to be considered
리턴 void

IsNotSupersetOf() 공개 정적인 메소드

Asserts that the subset does not contain the superset
public static IsNotSupersetOf ( IEnumerable superset, IEnumerable subset, string message ) : void
superset IEnumerable The IEnumerable superset to be considered
subset IEnumerable The IEnumerable subset to be considered
message string The message that will be displayed on failure
리턴 void

IsOrdered() 공개 정적인 메소드

Assert that an array, list or other collection is ordered
public static IsOrdered ( IEnumerable collection ) : void
collection IEnumerable An array, list or other collection implementing IEnumerable
리턴 void

IsOrdered() 공개 정적인 메소드

Assert that an array, list or other collection is ordered
public static IsOrdered ( IEnumerable collection, IComparer comparer ) : void
collection IEnumerable An array, list or other collection implementing IEnumerable
comparer IComparer A custom comparer to perform the comparisons
리턴 void

IsOrdered() 공개 정적인 메소드

Assert that an array, list or other collection is ordered
public static IsOrdered ( IEnumerable collection, IComparer comparer, string message ) : void
collection IEnumerable An array, list or other collection implementing IEnumerable
comparer IComparer A custom comparer to perform the comparisons
message string The message to be displayed on failure
리턴 void

IsOrdered() 공개 정적인 메소드

Assert that an array, list or other collection is ordered
public static IsOrdered ( IEnumerable collection, string message ) : void
collection IEnumerable An array, list or other collection implementing IEnumerable
message string The message to be displayed on failure
리턴 void

IsSubsetOf() 공개 정적인 메소드

Asserts that the superset contains the subset.
public static IsSubsetOf ( IEnumerable subset, IEnumerable superset ) : void
subset IEnumerable The IEnumerable subset to be considered
superset IEnumerable The IEnumerable superset to be considered
리턴 void

IsSubsetOf() 공개 정적인 메소드

Asserts that the superset contains the subset.
public static IsSubsetOf ( IEnumerable subset, IEnumerable superset, string message ) : void
subset IEnumerable The IEnumerable subset to be considered
superset IEnumerable The IEnumerable superset to be considered
message string The message that will be displayed on failure
리턴 void

IsSupersetOf() 공개 정적인 메소드

Asserts that the subset contains the superset.
public static IsSupersetOf ( IEnumerable superset, IEnumerable subset ) : void
superset IEnumerable The IEnumerable superset to be considered
subset IEnumerable The IEnumerable subset to be considered
리턴 void

IsSupersetOf() 공개 정적인 메소드

Asserts that the subset contains the superset.
public static IsSupersetOf ( IEnumerable superset, IEnumerable subset, string message ) : void
superset IEnumerable The IEnumerable superset to be considered
subset IEnumerable The IEnumerable subset to be considered
message string The message that will be displayed on failure
리턴 void

ReferenceEquals() 공개 정적인 메소드

DO NOT USE! The ReferenceEquals method throws an InvalidOperationException. This is done to make sure there is no mistake by calling this function.
public static ReferenceEquals ( object a, object b ) : void
a object
b object
리턴 void