NUnit.Framework.CollectionAssert.AllItemsAreInstancesOfType C# (CSharp) Méthode

AllItemsAreInstancesOfType() public static méthode

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
Résultat void
        public static void AllItemsAreInstancesOfType (IEnumerable collection, Type expectedType)
        {
            AllItemsAreInstancesOfType(collection, expectedType, string.Empty, null);
        }

Same methods

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

Usage Example

Exemple #1
0
        public void GivenStatementAndWordDictionaryCheckStatementWordSplit(bool removePunctuation, string[] wordDictionary)
        {
            var res = "Hello, I am Slava!".ToWordArray(removePunctuation);

            CollectionAssert.AllItemsAreInstancesOfType(res, typeof(string));
            CollectionAssert.AllItemsAreNotNull(res);
            CollectionAssert.AreEquivalent(res, wordDictionary);
        }
All Usage Examples Of NUnit.Framework.CollectionAssert::AllItemsAreInstancesOfType