NuGet.Test.Mocks.MockFileSystem.GetFullPath C# (CSharp) Method

GetFullPath() public method

public GetFullPath ( string path ) : string
path string
return string
        public virtual string GetFullPath(string path)
        {
            return Path.Combine(Root, path);
        }

Usage Example

Beispiel #1
0
        public void RestoreCommandPreferSolutionFile()
        {
            // Arrange
            var fileSystem = new MockFileSystem();
            fileSystem.AddFile("a.sln");
            fileSystem.AddFile("packages.config");

            var restoreCommand = new RestoreCommand()
            {
                FileSystem = fileSystem
            };

            // Act
            restoreCommand.DetermineRestoreMode();

            // Assert
            Assert.True(restoreCommand.RestoringForSolution);
            Assert.Equal(fileSystem.GetFullPath("a.sln"), restoreCommand.SolutionFileFullPath);
        }