public void DontExpandVariablesWithInvalidCharacters() { ExpandableString str = "this a string $(VAR 1) and also $(VAR2)"; Environment.SetEnvironmentVariable("VAR1", "VAR1_VALUE1"); Environment.SetEnvironmentVariable("VAR2", "VAR2_VALUE2"); str.Should().Be("this a string $(VAR 1) and also VAR2_VALUE2"); }
public void Expand() { ExpandableString str = "this a string $(VAR1) and also $(VAR2)"; Environment.SetEnvironmentVariable("VAR1", "VAR1_VALUE1"); Environment.SetEnvironmentVariable("VAR2", "VAR2_VALUE2"); str.Should().Be("this a string VAR1_VALUE1 and also VAR2_VALUE2"); }
public void DontExpandVariablesWhenOpenButNotClosingBrace() { ExpandableString str = "this a string $(VAR1 and also $(VAR2"; Environment.SetEnvironmentVariable("VAR1", "VAR1_VALUE1"); Environment.SetEnvironmentVariable("VAR2", "VAR2_VALUE2"); str.Should().Be("this a string $(VAR1 and also $(VAR2"); }