public void ReturnsDeclarationsWithDelimiterWithLeadingSpaces() { // Given string configScript = @"A= =B === =C D --- -E F"; // When ConfigParts configParts = ConfigSplitter.Split(configScript); // Then Assert.IsNull(configParts.Setup); Assert.IsNull(configParts.Declarations); Assert.AreEqual(@"#line 1 A= =B === =C D --- -E F", configParts.Config); }
public void ReturnsBothPartsWithDelimiterWithExtraLines() { // Given string configScript = @"A= =B === =C D"; // When ConfigParts configParts = ConfigSplitter.Split(configScript); // Then Assert.AreEqual(@"#line 1 A= =B ", configParts.Setup); Assert.IsNull(configParts.Declarations); Assert.AreEqual(@"#line 5 =C D", configParts.Config); }
public void ReturnsConfigWithoutDelimiter() { // Given string configScript = @"A= =B C"; // When ConfigParts configParts = ConfigSplitter.Split(configScript); // Then Assert.IsNull(configParts.Setup); Assert.IsNull(configParts.Declarations); Assert.AreEqual(@"#line 1 A= =B C", configParts.Config); }