Advertisement
elena1234

NUnit testing with TestCase

May 14th, 2021 (edited)
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1.  
  2.         [TestCase(new int[] { 1, 2, 3 })]
  3.         [TestCase(new int[] { 0 })]
  4.         [TestCase(new int[] {})]
  5.         public void FetchCommandShouldReturnCopyOfData(int[] expectedData)
  6.         {
  7.             // Arrange
  8.             this.database = new Database.Database(expectedData);
  9.  
  10.             // Act
  11.              int[] resultArray  = database.Fetch();
  12.  
  13.             // Assert
  14.             CollectionAssert.AreEqual(expectedData,resultArray);
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement