コード例 #1
0
        public void TestGetProductsOfAllIntsExceptAtIndexHasValidInput()
        {
            // Arrange
            int[] validInput = new int[] { 1, 7, 3, 4 };
            int[] expected   = new int[] { 84, 12, 28, 21 };

            // Act
            int[] result = ProductOfEveryInteger.GetProductsOfAllIntsExceptAtIndex(validInput);
            // Assert
            CollectionAssert.AreEqual(expected, result);
        }
コード例 #2
0
 public void TestGetProductsOfAllIntsExceptAtIndexHasInvalidInput()
 {
     int[] badInput = new int[0];
     var   result   = ProductOfEveryInteger.GetProductsOfAllIntsExceptAtIndex(badInput);
 }