Example #1
0
        public void ReturnsEmptyOnFailureFromAttributeSource(ILineSource lineSource)
        {
            // Arrange

            // Act
            IEnumerable <string> lines = lineSource.GetLines();

            // Assert
            Assert.IsFalse(lines.Any());
        }
Example #2
0
            public void ReturnsEmptyOnFailure()
            {
                // Arrange
                ILineSource lineSource = GetLineSourceWithoutData();

                // Act
                IEnumerable <string> lines = lineSource.GetLines();

                // Assert
                Assert.IsFalse(lines.Any());
            }
Example #3
0
            public void CanRetrieveValidData()
            {
                // Arrange
                string[] csvLines =
                {
                    "first,second,third",
                    "1,2,3"
                };

                ILineSource lineSource = GetLineSourceWithData(csvLines);

                // Act
                string[] lines = lineSource.GetLines().ToArray();

                // Assert
                CollectionAssert.AreEqual(csvLines, lines);
            }