예제 #1
0
        public void IsPathRooted_ReturnsFalse_ForRelativePaths(string path)
        {
            // Arrange
            var fileResult = new FilePathResult(path, "text/plain", Mock.Of <IFileSystem>());

            // Act
            var isRooted = fileResult.IsPathRooted(path);

            // Assert
            Assert.False(isRooted);
        }
예제 #2
0
        public void IsPathRooted_ReturnsTrue_ForAbsolutePaths(string path)
        {
            // Arrange
            var fileResult = new FilePathResult(path, "text/plain")
            {
                FileProvider = Mock.Of <IFileProvider>(),
            };

            // Act
            var isRooted = fileResult.IsPathRooted(path);

            // Assert
            Assert.True(isRooted);
        }
예제 #3
0
        public void IsPathRooted_ReturnsFalse_ForRelativePaths(string path)
        {
            // Arrange
            var fileResult = new FilePathResult(path, "text/plain")
            {
                FileProvider = Mock.Of<IFileProvider>(),
            };

            // Act
            var isRooted = fileResult.IsPathRooted(path);

            // Assert
            Assert.False(isRooted);
        }