CollectionAssert.AllItemsAreNotNull メソッド (ICollection, String)

指定されたコレクションの項目の一部は nullnull 参照 (Visual Basic では Nothing) でないことを検証します。いずれかの要素が nullnull 参照 (Visual Basic では Nothing) である場合、アサーションは失敗します。アサーションが失敗した場合はメッセージを表示します。

名前空間:  Microsoft.VisualStudio.TestTools.UnitTesting
アセンブリ:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 内)

構文

'宣言
Public Shared Sub AllItemsAreNotNull ( _
    collection As ICollection, _
    message As String _
)
public static void AllItemsAreNotNull(
    ICollection collection,
    string message
)
public:
static void AllItemsAreNotNull(
    ICollection^ collection, 
    String^ message
)
static member AllItemsAreNotNull : 
        collection:ICollection * 
        message:string -> unit 
public static function AllItemsAreNotNull(
    collection : ICollection, 
    message : String
)

パラメーター

  • message
    型 : System.String
    アサーションが失敗した場合に表示されるメッセージです。このメッセージは、単体テストの結果で確認できます。

例外

例外 条件
AssertFailedException

collection に nullnull 参照 (Visual Basic では Nothing) の要素が見つかりました。

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

CollectionAssert クラス

AllItemsAreNotNull オーバーロード

Microsoft.VisualStudio.TestTools.UnitTesting 名前空間

その他の技術情報

Assert クラスの使用