Exemple #1
0
        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);
            }
        }
Exemple #2
0
 public void ExpandEnvironmentVariables_Existing()
 {
     SystemInformationMethods.ExpandEnvironmentVariables(@"%COMPUTERNAME%").
     Should().Be(Environment.GetEnvironmentVariable("COMPUTERNAME"));
 }