Mercurial > repos > IBBoard.Tests
comparison ArraysTests.cs @ 36:8c1e331b47d5
* Remove reliance on IBBoard.NUnit
* Swap from IBBoard.NUnit method for array checking to a simple equality check. This constrains order, but should be okay for these tests for now.
no-open-ticket
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 16 Apr 2011 18:53:35 +0000 |
parents | 9bdfaf717b58 |
children | 99e4c1949c92 |
comparison
equal
deleted
inserted
replaced
35:791b84b79a0f | 36:8c1e331b47d5 |
---|---|
2 // | 2 // |
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. | 3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. |
4 using System; | 4 using System; |
5 using NUnit.Framework; | 5 using NUnit.Framework; |
6 using NUnit.Framework.SyntaxHelpers; | 6 using NUnit.Framework.SyntaxHelpers; |
7 using IBBoard.NUnit; | |
8 namespace IBBoard | 7 namespace IBBoard |
9 { | 8 { |
10 [TestFixture()] | 9 [TestFixture()] |
11 public class ArraysTests | 10 public class ArraysTests |
12 { | 11 { |
59 } | 58 } |
60 | 59 |
61 [Test()] | 60 [Test()] |
62 public void TestDifferenceWithNoOverlapReturnsAllEntities() | 61 public void TestDifferenceWithNoOverlapReturnsAllEntities() |
63 { | 62 { |
64 Assert.That(Arrays.Difference(ONE_ITEM_ARRAY, OTHER_ONE_ITEM_ARRAY), Does.ArrayContain(STRING_FOUR, STRING_TWO)); | 63 Assert.AreEqual(Arrays.Difference(ONE_ITEM_ARRAY, OTHER_ONE_ITEM_ARRAY), new String[]{STRING_FOUR, STRING_TWO}); |
65 Assert.That(Arrays.Difference(ONE_ITEM_ARRAY, TWO_ITEM_ARRAY), Does.ArrayContain(STRING_ONE, STRING_THREE, STRING_FOUR)); | 64 Assert.AreEqual(Arrays.Difference(ONE_ITEM_ARRAY, TWO_ITEM_ARRAY), new String[]{STRING_ONE, STRING_THREE, STRING_FOUR}); |
66 Assert.That(Arrays.Difference(TWO_ITEM_ARRAY, ONE_ITEM_ARRAY), Does.ArrayContain(STRING_ONE, STRING_THREE, STRING_FOUR)); | 65 Assert.AreEqual(Arrays.Difference(TWO_ITEM_ARRAY, ONE_ITEM_ARRAY), new String[]{STRING_ONE, STRING_THREE, STRING_FOUR}); |
67 Assert.That(Arrays.Difference(EMPTY_ARRAY, ONE_ITEM_ARRAY), Does.ArrayContain(STRING_FOUR)); | 66 Assert.AreEqual(Arrays.Difference(EMPTY_ARRAY, ONE_ITEM_ARRAY), new String[]{STRING_FOUR}); |
68 Assert.That(Arrays.Difference(TWO_ITEM_ARRAY, EMPTY_ARRAY), Does.ArrayContain(STRING_ONE, STRING_THREE)); | 67 Assert.AreEqual(Arrays.Difference(TWO_ITEM_ARRAY, EMPTY_ARRAY), new String[]{STRING_ONE, STRING_THREE}); |
69 } | 68 } |
70 | 69 |
71 [Test()] | 70 [Test()] |
72 public void TestDifferenceWithFullOverlapReturnsNoEntities() | 71 public void TestDifferenceWithFullOverlapReturnsNoEntities() |
73 { | 72 { |