Assert.AreAllOfType メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| 名前 | 説明 |
|---|---|
| AreAllOfType(Type, IEnumerable, String, String, String) |
指定したコレクション内のすべての要素が予期される型のインスタンス (または派生) であるかどうかをテストし、予期される型が 1 つ以上の要素の継承階層にない場合、または要素が null の場合に例外をスローします。 |
| AreAllOfType<TExpected,TItem>(ReadOnlyMemory<TItem>, String, String) |
指定したメモリ内のすべての要素が、 |
| AreAllOfType<TExpected,TItem>(Span<TItem>, String, String) |
指定したスパン内のすべての要素が、 |
| AreAllOfType<TExpected,TItem>(ReadOnlySpan<TItem>, String, String) |
指定したスパン内のすべての要素が、 |
| AreAllOfType<TExpected,TItem>(Memory<TItem>, String, String) |
指定したメモリ内のすべての要素が、 |
| AreAllOfType<TExpected>(IEnumerable, String, String) |
指定したコレクション内のすべての要素が予期される型のインスタンス (または派生) であるかどうかをテストし、予期される型が 1 つ以上の要素の継承階層にない場合、または要素が null の場合に例外をスローします。 |
| AreAllOfType<TItem>(Type, ReadOnlyMemory<TItem>, String, String, String) |
指定したメモリ内のすべての要素が、想定される型のインスタンス (または派生した要素) であるかどうかをテストします。 |
| AreAllOfType<TItem>(Type, ReadOnlySpan<TItem>, String, String, String) |
指定したスパン内のすべての要素が、想定される型のインスタンス (または派生した要素) であるかどうかをテストします。 |
| AreAllOfType<TItem>(Type, Memory<TItem>, String, String, String) |
指定したメモリ内のすべての要素が、想定される型のインスタンス (または派生した要素) であるかどうかをテストします。 |
| AreAllOfType<TItem>(Type, Span<TItem>, String, String, String) |
指定したスパン内のすべての要素が、想定される型のインスタンス (または派生した要素) であるかどうかをテストします。 |
AreAllOfType(Type, IEnumerable, String, String, String)
指定したコレクション内のすべての要素が予期される型のインスタンス (または派生) であるかどうかをテストし、予期される型が 1 つ以上の要素の継承階層にない場合、または要素が null の場合に例外をスローします。
public static void AreAllOfType(Type? expectedType, System.Collections.IEnumerable? collection, string? message = "", string expectedTypeExpression = "", string collectionExpression = "");
static member AreAllOfType : Type * System.Collections.IEnumerable * string * string * string -> unit
Public Shared Sub AreAllOfType (expectedType As Type, collection As IEnumerable, Optional message As String = "", Optional expectedTypeExpression As String = "", Optional collectionExpression As String = "")
パラメーター
- expectedType
- Type
collectionの各要素の予期される型。
- collection
- IEnumerable
テストで想定される要素を含むコレクションは、指定した型です。
- message
- String
collection内の要素が null であるか、expectedTypeのインスタンスでない場合に例外に含めるメッセージ。 メッセージがテスト結果に表示されます。
- expectedTypeExpression
- String
呼び出し元の引数式を使用してコンパイラによって指定された expectedType の構文式。 ユーザーは、このパラメーターの値を渡さないでください。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。
例外
expectedTypeまたはcollectionが null の場合、またはcollectionの一部の要素が null であるか、expectedTypeから継承または実装されていない場合にスローされます。
適用対象
AreAllOfType<TExpected,TItem>(ReadOnlyMemory<TItem>, String, String)
指定したメモリ内のすべての要素が、 TExpectedのインスタンス (または派生) であるかどうかをテストします。
public static void AreAllOfType<TExpected,TItem>(ReadOnlyMemory<TItem> collection, string? message = "", string collectionExpression = "");
static member AreAllOfType : ReadOnlyMemory<'Item> * string * string -> unit
Public Shared Sub AreAllOfType(Of TExpected, TItem) (collection As ReadOnlyMemory(Of TItem), Optional message As String = "", Optional collectionExpression As String = "")
型パラメーター
- TExpected
collectionの各要素の型は次のように想定されます。
- TItem
メモリの要素型。
パラメーター
- collection
- ReadOnlyMemory<TItem>
テストで予期される要素を含むメモリは、指定した型です。
- message
- String
アサーションが失敗したときに例外に含めるメッセージ。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。
適用対象
AreAllOfType<TExpected,TItem>(Span<TItem>, String, String)
指定したスパン内のすべての要素が、 TExpectedのインスタンス (または派生した要素) であるかどうかをテストします。
public static void AreAllOfType<TExpected,TItem>(Span<TItem> collection, string? message = "", string collectionExpression = "");
static member AreAllOfType : Span<'Item> * string * string -> unit
Public Shared Sub AreAllOfType(Of TExpected, TItem) (collection As Span(Of TItem), Optional message As String = "", Optional collectionExpression As String = "")
型パラメーター
- TExpected
collectionの各要素の型は次のように想定されます。
- TItem
スパンの要素型。
パラメーター
- collection
- Span<TItem>
テストで想定される要素を含むスパンは、指定した型です。
- message
- String
アサーションが失敗したときに例外に含めるメッセージ。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。
適用対象
AreAllOfType<TExpected,TItem>(ReadOnlySpan<TItem>, String, String)
指定したスパン内のすべての要素が、 TExpectedのインスタンス (または派生した要素) であるかどうかをテストします。
public static void AreAllOfType<TExpected,TItem>(ReadOnlySpan<TItem> collection, string? message = "", string collectionExpression = "");
static member AreAllOfType : ReadOnlySpan<'Item> * string * string -> unit
Public Shared Sub AreAllOfType(Of TExpected, TItem) (collection As ReadOnlySpan(Of TItem), Optional message As String = "", Optional collectionExpression As String = "")
型パラメーター
- TExpected
collectionの各要素の型は次のように想定されます。
- TItem
スパンの要素型。
パラメーター
- collection
- ReadOnlySpan<TItem>
テストで想定される要素を含むスパンは、指定した型です。
- message
- String
アサーションが失敗したときに例外に含めるメッセージ。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。
適用対象
AreAllOfType<TExpected,TItem>(Memory<TItem>, String, String)
指定したメモリ内のすべての要素が、 TExpectedのインスタンス (または派生) であるかどうかをテストします。
public static void AreAllOfType<TExpected,TItem>(Memory<TItem> collection, string? message = "", string collectionExpression = "");
static member AreAllOfType : Memory<'Item> * string * string -> unit
Public Shared Sub AreAllOfType(Of TExpected, TItem) (collection As Memory(Of TItem), Optional message As String = "", Optional collectionExpression As String = "")
型パラメーター
- TExpected
collectionの各要素の型は次のように想定されます。
- TItem
メモリの要素型。
パラメーター
- collection
- Memory<TItem>
テストで予期される要素を含むメモリは、指定した型です。
- message
- String
アサーションが失敗したときに例外に含めるメッセージ。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。
適用対象
AreAllOfType<TExpected>(IEnumerable, String, String)
指定したコレクション内のすべての要素が予期される型のインスタンス (または派生) であるかどうかをテストし、予期される型が 1 つ以上の要素の継承階層にない場合、または要素が null の場合に例外をスローします。
public static void AreAllOfType<TExpected>(System.Collections.IEnumerable? collection, string? message = "", string collectionExpression = "");
static member AreAllOfType : System.Collections.IEnumerable * string * string -> unit
Public Shared Sub AreAllOfType(Of TExpected) (collection As IEnumerable, Optional message As String = "", Optional collectionExpression As String = "")
型パラメーター
- TExpected
collectionの各要素の型は次のように想定されます。
パラメーター
- collection
- IEnumerable
テストで想定される要素を含むコレクションは、指定した型です。
- message
- String
collection内の要素が null であるか、TExpectedのインスタンスでない場合に例外に含めるメッセージ。 メッセージがテスト結果に表示されます。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。
例外
collectionが null であるか、collectionの一部の要素が null であるか、TExpectedから継承または実装されていない場合にスローされます。
適用対象
AreAllOfType<TItem>(Type, ReadOnlyMemory<TItem>, String, String, String)
指定したメモリ内のすべての要素が、想定される型のインスタンス (または派生した要素) であるかどうかをテストします。
public static void AreAllOfType<TItem>(Type? expectedType, ReadOnlyMemory<TItem> collection, string? message = "", string expectedTypeExpression = "", string collectionExpression = "");
static member AreAllOfType : Type * ReadOnlyMemory<'Item> * string * string * string -> unit
Public Shared Sub AreAllOfType(Of TItem) (expectedType As Type, collection As ReadOnlyMemory(Of TItem), Optional message As String = "", Optional expectedTypeExpression As String = "", Optional collectionExpression As String = "")
型パラメーター
- TItem
メモリの要素型。
パラメーター
- expectedType
- Type
collectionの各要素の予期される型。
- collection
- ReadOnlyMemory<TItem>
テストで予期される要素を含むメモリは、指定した型です。
- message
- String
アサーションが失敗したときに例外に含めるメッセージ。
- expectedTypeExpression
- String
呼び出し元の引数式を使用してコンパイラによって指定された expectedType の構文式。 ユーザーは、このパラメーターの値を渡さないでください。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。
適用対象
AreAllOfType<TItem>(Type, ReadOnlySpan<TItem>, String, String, String)
指定したスパン内のすべての要素が、想定される型のインスタンス (または派生した要素) であるかどうかをテストします。
public static void AreAllOfType<TItem>(Type? expectedType, ReadOnlySpan<TItem> collection, string? message = "", string expectedTypeExpression = "", string collectionExpression = "");
static member AreAllOfType : Type * ReadOnlySpan<'Item> * string * string * string -> unit
Public Shared Sub AreAllOfType(Of TItem) (expectedType As Type, collection As ReadOnlySpan(Of TItem), Optional message As String = "", Optional expectedTypeExpression As String = "", Optional collectionExpression As String = "")
型パラメーター
- TItem
スパンの要素型。
パラメーター
- expectedType
- Type
collectionの各要素の予期される型。
- collection
- ReadOnlySpan<TItem>
テストで想定される要素を含むスパンは、指定した型です。
- message
- String
アサーションが失敗したときに例外に含めるメッセージ。
- expectedTypeExpression
- String
呼び出し元の引数式を使用してコンパイラによって指定された expectedType の構文式。 ユーザーは、このパラメーターの値を渡さないでください。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。
適用対象
AreAllOfType<TItem>(Type, Memory<TItem>, String, String, String)
指定したメモリ内のすべての要素が、想定される型のインスタンス (または派生した要素) であるかどうかをテストします。
public static void AreAllOfType<TItem>(Type? expectedType, Memory<TItem> collection, string? message = "", string expectedTypeExpression = "", string collectionExpression = "");
static member AreAllOfType : Type * Memory<'Item> * string * string * string -> unit
Public Shared Sub AreAllOfType(Of TItem) (expectedType As Type, collection As Memory(Of TItem), Optional message As String = "", Optional expectedTypeExpression As String = "", Optional collectionExpression As String = "")
型パラメーター
- TItem
メモリの要素型。
パラメーター
- expectedType
- Type
collectionの各要素の予期される型。
- collection
- Memory<TItem>
テストで予期される要素を含むメモリは、指定した型です。
- message
- String
アサーションが失敗したときに例外に含めるメッセージ。
- expectedTypeExpression
- String
呼び出し元の引数式を使用してコンパイラによって指定された expectedType の構文式。 ユーザーは、このパラメーターの値を渡さないでください。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。
適用対象
AreAllOfType<TItem>(Type, Span<TItem>, String, String, String)
指定したスパン内のすべての要素が、想定される型のインスタンス (または派生した要素) であるかどうかをテストします。
public static void AreAllOfType<TItem>(Type? expectedType, Span<TItem> collection, string? message = "", string expectedTypeExpression = "", string collectionExpression = "");
static member AreAllOfType : Type * Span<'Item> * string * string * string -> unit
Public Shared Sub AreAllOfType(Of TItem) (expectedType As Type, collection As Span(Of TItem), Optional message As String = "", Optional expectedTypeExpression As String = "", Optional collectionExpression As String = "")
型パラメーター
- TItem
スパンの要素型。
パラメーター
- expectedType
- Type
collectionの各要素の予期される型。
- collection
- Span<TItem>
テストで想定される要素を含むスパンは、指定した型です。
- message
- String
アサーションが失敗したときに例外に含めるメッセージ。
- expectedTypeExpression
- String
呼び出し元の引数式を使用してコンパイラによって指定された expectedType の構文式。 ユーザーは、このパラメーターの値を渡さないでください。
- collectionExpression
- String
呼び出し元の引数式を介してコンパイラによって指定されたコレクションの構文式。 ユーザーは、このパラメーターの値を渡さないでください。