Example #1
0
        public void GetAssumedHeaderRow_GetsFirstRowOnly_AndSplitsRow()
        {
            // Arrange
            var expectedStrProp    = fixture.Create <string>();
            var notExpectedStrProp = fixture.Create <string>();

            var rows = new List <string>
            {
                $"{expectedStrProp}1,{expectedStrProp}2",
                $"{notExpectedStrProp}1.1,{notExpectedStrProp}1.2",
                $"{notExpectedStrProp}1.1,{notExpectedStrProp}2.2"
            };

            // Act
            var result = _sut.GetAssumedHeaderRow(rows);

            // Assert
            Assert.AreEqual(2, result.Count);
            Assert.IsTrue(result.All(item => item.StartsWith(expectedStrProp)));
        }