public void TestExpandEnvironmentVariables() { const string expectedEnvVarValue = "ExpectedEnvVarValue"; const string targetEnvVarName = "TargetEnvVarName"; Environment.SetEnvironmentVariable(targetEnvVarName, expectedEnvVarValue); string result = _objectUnderTest.ExpandEnvironmentVariables($"%{targetEnvVarName}%"); Assert.AreEqual(expectedEnvVarValue, result); }