NUnit.Framework.Assertions.CollectionAssertTest.CountToThree()

Here are the examples of the csharp api class NUnit.Framework.Assertions.CollectionAssertTest.CountToThree() 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: CollectionAssertTest.cs
View license
[Test]
        public void AreEqual_UsingIterator()
        {
            int[] array = new int[] { 1, 2, 3 };

            CollectionAssert.AreEqual(array, CountToThree());
        }

2. Example

Project: nunit
Source File: CollectionAssertTest.cs
View license
[Test]
        public void AreEqual_UsingIterator_Fails()
        {
            int[] array = new int[] { 1, 3, 5 };

            AssertionException ex = Assert.Throws<AssertionException>(
                delegate { CollectionAssert.AreEqual(array, CountToThree()); } );

            Assert.That(ex.Message, Does.Contain("Values differ at index [1]").And.
                                    Contains("Expected: 3").And.
                                    Contains("But was:  2"));
        }