public void ALUMultiply_Multiplies32BitIntegers(Int32 first, Int32 second, Int32 expected)
        {
            // Arrange
            var alu = new ArithmeticLogicUnit();

            // Act
            Int32 result = alu.Multiply(first, second);

            // Assert
            result.Should().Be(expected);
        }
Beispiel #2
0
        public void TestMultplicationMixed()
        {
            int                 inputA   = -2;
            int                 inputB   = 3;
            const int           EXPECTED = -6;
            ArithmeticLogicUnit alu      = new ArithmeticLogicUnit()
            {
                InputA = inputA,
                InputB = inputB
            };

            alu.Multiply();
            Assert.AreEqual(EXPECTED, alu.Output);
        }