NUnit.Framework.Assert.Contains(object, System.Collections.ICollection, string, params object[])

Here are the examples of the csharp api class NUnit.Framework.Assert.Contains(object, System.Collections.ICollection, string, params object[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: nunit
Source File: ListContentsTests.cs
View license
[Test]
        public void ArraySucceeds()
        {
            Assert.Contains("abc", testArray);
            Assert.Contains(123, testArray);
            Assert.Contains("xyz", testArray, "expected array containing '{0}'", "xyz");
        }

2. Example

Project: nunit
Source File: SetUpFixtureData.cs
View license
public bool MatchEvent(string @event, int item)
            {
                Assert.Contains(@event, _expectedEvents, "Item {0}", item);
                _expectedEvents.Remove(@event);
                return _expectedEvents.Count > 0;
            }