Inheritance Hierarchy
DeltaEngine.Tests.Extensions PathExtensionsTests
Namespace: DeltaEngine.Tests.Extensions
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The PathExtensionsTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PathExtensionsTests | Initializes a new instance of the PathExtensionsTests class |
Methods
Examples
[Test] public void InstallerSetsDeltaEnginePathEnvironmentVariable() { MakeSureEnvironmentVariableIsSet(); Assert.IsTrue(PathExtensions.IsDeltaEnginePathEnvironmentVariableAvailable()); }
[Test] public void WithoutInstallerDeltaEnginePathEnvironmentVariableIsNotSet() { DeleteEnvironmentVariableIfSet(); Assert.IsFalse(PathExtensions.IsDeltaEnginePathEnvironmentVariableAvailable()); }
[Test, Ignore] public void DeltaEnginePathEnvironmentVariableMustBeAnExistingDirectory() { MakeSureEnvironmentVariableIsSet(); Assert.IsTrue(Directory.Exists(PathExtensions.GetDeltaEngineInstalledDirectory()), PathExtensions.GetDeltaEngineInstalledDirectory()); }
[Test] public void GetAbsolutePath() { Assert.AreEqual(Environment.CurrentDirectory, PathExtensions.GetAbsolutePath(null)); Assert.AreEqual(Environment.CurrentDirectory, PathExtensions.GetAbsolutePath("")); Assert.AreEqual(Path.Combine(Environment.CurrentDirectory, "File.ext"), PathExtensions.GetAbsolutePath("File.ext")); }
[Test, Ignore] public void DefaultDeltaEngineSolutionFileShouldBeAvailable() { string defaultSourceCodeDirectory = PathExtensions.GetDeltaEngineSolutionFilePath(); Assert.IsTrue(File.Exists(defaultSourceCodeDirectory)); }
[Test, Ignore] public void InvalidStartupPathWillBeFixed() { Directory.SetCurrentDirectory(@"C:\"); var fixedPath = PathExtensions.GetFallbackEngineSourceCodeDirectory(); Assert.IsTrue(Directory.Exists(fixedPath), fixedPath); }
[Test, Ignore] public void DeltaEngineSolutionFileHasToBeAvailable() { string deltaEngineSolutionFilePath = PathExtensions.GetDeltaEngineSolutionFilePath(); Assert.IsTrue(deltaEngineSolutionFilePath.Contains(DeltaEngineSolutionFilename)); Assert.IsTrue(File.Exists(deltaEngineSolutionFilePath)); }
See Also