public void ExpandEnvironmentVariables_Long() { string longValue = new string('a', 100); try { Environment.SetEnvironmentVariable("ExpandEnvironmentVariables_Long", longValue); SystemInformationMethods.ExpandEnvironmentVariables(@"%ExpandEnvironmentVariables_Long%"). Should().Be(longValue); } finally { Environment.SetEnvironmentVariable("ExpandEnvironmentVariables_Long", null); } }
public void ExpandEnvironmentVariables_Existing() { SystemInformationMethods.ExpandEnvironmentVariables(@"%COMPUTERNAME%"). Should().Be(Environment.GetEnvironmentVariable("COMPUTERNAME")); }