public void AddLine_WhenWhitespaceChar_Removed(string testInput, string cleaned) { // Arrange var expected = $"|{cleaned}|{Environment.NewLine}"; var vsinstance = new AzureDevOpsInstance(); vsinstance.Collections.Add(new AzureDevOpsCollection { Name = testInput }); var systemUnderTest = new MDTestClass(); // Act var actual = systemUnderTest.Generate(vsinstance); // Assert actual.Should().Be(expected); }
public void AddLine_WhenUsingPipeChar_EscapingHappens() { // Arrange var expectedReport = $"|Test\\|Name|{Environment.NewLine}"; var textString = "Test|Name"; var vsinstance = new AzureDevOpsInstance(); vsinstance.Collections.Add(new AzureDevOpsCollection { Name = textString }); var systemUnderTest = new MDTestClass(); // Act var actual = systemUnderTest.Generate(vsinstance); // Assert actual.Should().Be(expectedReport); }