コード例 #1
0
        public void ConvertToSourceDocument_ConvertsMarkerImports()
        {
            // Arrange
            var projectItem = Mock.Of <RazorProjectItem>(item => item.FilePath == "Index.cshtml" && item.Exists == false);

            // Act
            var sourceDocument = DefaultRazorProjectEngine.ConvertToSourceDocument(projectItem);

            // Assert
            Assert.NotNull(sourceDocument);
        }
コード例 #2
0
        public void ConvertToSourceDocument_ConvertsNormalImports()
        {
            // Arrange
            var projectItem = new TestRazorProjectItem("Index.cshtml");

            // Act
            var sourceDocument = DefaultRazorProjectEngine.ConvertToSourceDocument(projectItem);

            // Assert
            Assert.NotNull(sourceDocument);
        }