コード例 #1
0
        public void CalculateNumberValueTests()
        {
            // Arrange
            var exampleMultipliers1 = new int[] { 3, 200, 320, 999, 1 };
            var expectedResult1     = 3200320999D;

            var exampleMultipliers2 = new int[] { 0, 0, 999, 0, -1 };
            var expectedResult2     = -999000D;

            // Act
            var actualResult1 = converterHelper.CalculateNumberValue(exampleMultipliers1);
            var actualResult2 = converterHelper.CalculateNumberValue(exampleMultipliers2);

            // Assert
            Assert.AreEqual(expectedResult1, actualResult1);
            Assert.AreEqual(expectedResult2, actualResult2);
        }