Exemplo n.º 1
0
        public void TransformHeader__When_AColumnNameIsNotUnique__Must_ThrowAnException(
            IList <string> columnCells,
            string columnName)
        {
            var target = new ColumnInserter(cellInserter.Object, 1, columnName);

            Assert.Throws <NonUniqueColumnException>(
                () => target.TransformHeader(columnCells.ToArray()));
        }
Exemplo n.º 2
0
        public void TransformHeader__Should_UseThe_CellInserter_ToInsertABrandNewCell_IntoARow(
            IList <string> input,
            int targetColumnIndex)
        {
            var expectedRow = input.ToArray();

            var target = new ColumnInserter(cellInserter.Object, targetColumnIndex, "unique");

            target.TransformHeader(expectedRow);

            Verify_AShinyBrandNewCellIsInserted(expectedRow, targetColumnIndex);
        }
Exemplo n.º 3
0
        public void Transform__Should_Insert_An_Empty_Cell(
            IList <string> input,
            int targetColumnIndex)
        {
            var expectedRow = input.ToArray();

            var target = new ColumnInserter(cellInserter.Object, targetColumnIndex, "unique");

            target.Transform(expectedRow);

            Verify_CellInsertion(expectedRow, targetColumnIndex, null);
        }
Exemplo n.º 4
0
        public void TransformHeader__Should_Insert_A_Cell_WithASpecifiedColumnNameValue(
            IList <string> input,
            int targetColumnIndex,
            string columnName)
        {
            var expectedRow = input.ToArray();

            var target = new ColumnInserter(cellInserter.Object, targetColumnIndex, columnName);

            target.TransformHeader(expectedRow);

            Verify_CellInsertion(expectedRow, targetColumnIndex, columnName);
        }