예제 #1
0
        public void GetConvertedResultColumn()
        {
            // Arrange
            int NUMBER_OF_ROWS         = (new Random()).Next(1, 5);
            List <ITruthTableRow> ttrs = GenerateXTruthTableRowMocks(NUMBER_OF_ROWS);
            TruthTable            tt   = new TruthTable(ttrs);

            // Act
            List <int> convertedResultColumn = tt.GetConvertedResultColumn();

            int            resultValue;
            ITruthTableRow currentRow;

            for (int i = 0; i < convertedResultColumn.Count; i++)
            {
                resultValue = convertedResultColumn[i];
                currentRow  = ttrs[i];

                // Assert
                resultValue.Should().Be(Convert.ToInt32(currentRow.Result), "Because the resulting truth value should reflect the according integer value");
            }
        }