AllItemsAreNotNull() public static method

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
return void
Beispiel #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);
        }
Beispiel #2
0
        public void GivenStatementAndWordCountDictionaryCheckCountedWordsInStatement(bool removePunctuation)
        {
            var wc  = removePunctuation ? wc1 : wc2;
            var res = "HELLO, HELLO, HELLO, HELLO, HELLO!"
                      .ToWordArray(removePunctuation)
                      .CountWordOccurences();

            CollectionAssert.AllItemsAreInstancesOfType(res, typeof(WordCount));
            CollectionAssert.AllItemsAreNotNull(res);
            CollectionAssert.AreEquivalent(res, wc);
        }