Ejemplo n.º 1
0
        public void HeaderCountNotSameAsPropertyCount_ContinuesAfterYesUserInput()
        {
            // Arrange
            var headerCount    = 1;
            var propertyCount  = 2;
            var expectedOutput = $"The amount of properties that will be mapped are not equal to the amount of properties in the headers line of the CSV file. Properties to be mapped: {propertyCount}; Properties in header: {headerCount}. Would you like to continue? y/N";


            _consoleMock.Setup(c => c.GetTextFromUser(It.IsAny <bool>())).Returns("y");

            // Act
            _sut.HeaderCountNotSameAsPropertyCount(headerCount, propertyCount);

            // Assert
            _consoleMock.Verify(c => c.WriteTextForUser(It.Is <string>(x => x == expectedOutput)), Times.Once);
            _consoleMock.Verify(c => c.GetTextFromUser(It.Is <bool>(x => x == false)), Times.Once);
        }