public void MaxColumnLengthsFor_GivenOneDataRecordContainingOneField_ReturnsFieldLengthAsMaxColumnLength()
        {
            var dataRecord = new DataRecord();
            dataRecord.Add("field");

            List<DataRecord> dataRecords = new List<DataRecord> { dataRecord };

            var sut = new MaxConsoleColumnLengthsIdentifier();

            Assert.That(sut.MaxColumnLengthsOf(dataRecords), Is.EqualTo(new[] { "field".Length }), "max column lengths");
        }
        public void MaxColumnLengthsFor_GivenOneDataRecordContainingTwoFields_ReturnsMaxColumnLengthsForTwoColumns()
        {
            var dataRecord = new DataRecord();
            dataRecord.Add("field");
            dataRecord.Add("fieldxxx");

            List<DataRecord> dataRecords = new List<DataRecord> { dataRecord };

            var sut = new MaxConsoleColumnLengthsIdentifier();

            var expectedMaxLengths = new[] { "field".Length, "fieldxxx".Length };

            Assert.That(sut.MaxColumnLengthsOf(dataRecords), Is.EqualTo(expectedMaxLengths), "max column lengths");
        }
        public void MaxColumnLengthsFor_GivenTwoDataRecordsEachContainingOneField_ReturnsMaxColumnLengthForOneField()
        {
            var dataRecord1 = new DataRecord();
            dataRecord1.Add("field");

            var dataRecord2 = new DataRecord();
            dataRecord2.Add("fieldxxx");

            List<DataRecord> dataRecords = new List<DataRecord> { dataRecord1, dataRecord2 };

            var sut = new MaxConsoleColumnLengthsIdentifier();

            var expectedMaxLengths = new[] { "fieldxxx".Length };

            Assert.That(sut.MaxColumnLengthsOf(dataRecords), Is.EqualTo(expectedMaxLengths), "max column lengths");
        }