public void An_Environment_Variable_Is_Equal_To_The_Path_It_Resolves_To() { var lhs = SmartFolder.FromEnvironmentVariable("TEMP"); var rhs = new SmartFolder(ExpandEnvironmentVariables("%TEMP%")); lhs.Equals(rhs).Should().BeTrue(); }
public void Create_Using_Environment_Variable() { var sut = SmartFolder.FromEnvironmentVariable("TEMP"); sut.ToString("O").Should().Be("%TEMP%"); sut.ToString("G").Should().Be(ExpandEnvironmentVariables("%TEMP%") + @"\"); }
public void Absolute_Returns_The_Folder_With_An_Absolute_Path_And_Expands_Variables() { var lhs = SmartFolder.FromEnvironmentVariable("temp"); var rhs = lhs.ToAbsolute(); rhs.ToString("O").Should().NotContain("%", "environment variables must be expanded"); }
public void Create_Using_Environment_Variable_Throws_Exception_When_Null() { Action action = () => SmartFolder.FromEnvironmentVariable(null); action.Should().Throw <ArgumentNullException>(); }