Пример #1
0
        public void GetItem_RootedFilePath_DoesNotBelongToProject()
        {
            // Arrange
            var fileSystem       = new RemoteRazorProjectFileSystem("C:/path/to", FilePathNormalizer);
            var documentFilePath = "C:/otherpath/to/file.cshtml";

            // Act
            var item = fileSystem.GetItem(documentFilePath, fileKind: null);

            // Assert
            Assert.Equal(documentFilePath, item.FilePath);
            Assert.Equal(documentFilePath, item.PhysicalPath);
        }
Пример #2
0
        public void GetItem_RootlessFilePath()
        {
            // Arrange
            var fileSystem       = new RemoteRazorProjectFileSystem("/C:/path/to", FilePathNormalizer);
            var documentFilePath = "file.cshtml";

            // Act
            var item = fileSystem.GetItem(documentFilePath, fileKind: null);

            // Assert
            Assert.Equal(documentFilePath, item.FilePath);
            Assert.Equal("/C:/path/to/file.cshtml", item.PhysicalPath);
        }