Advertisement
pszczyg

SimpleCollectionAssertTests

Jan 8th, 2024
820
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1.  [TestFixture]
  2.  internal class SimpleCollectionAssertTests
  3.  {
  4.      class SimpleClass
  5.      {
  6.          public string Name { get; set; }
  7.      }
  8.  
  9.      [Test]
  10.      public void CompareSimpleCollections()
  11.      {
  12.          var expectedCollection = new List<SimpleClass>
  13.          {
  14.              new SimpleClass{ Name = "ExpectedName1" },
  15.              new SimpleClass{ Name = "ExpectedName2" },
  16.          };
  17.  
  18.          var actualCollection = new List<SimpleClass>
  19.          {
  20.              new SimpleClass{ Name = "ActualName1" },
  21.              new SimpleClass{ Name = "ActualName2" },
  22.          };
  23.  
  24.          CollectionAssert.AreEquivalent(expectedCollection, actualCollection);
  25.      }
  26.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement