Exemplo n.º 1
0
        public void ParseBlockMethodThrowsArgNullExceptionOnNullContext()
        {
            // Arrange
            CSharpCodeParser parser = new CSharpCodeParser();

            // Act and Assert
            Assert.Throws<InvalidOperationException>(() => parser.ParseBlock(), RazorResources.Parser_Context_Not_Set);
        }
Exemplo n.º 2
0
        public void ParseBlockMethodThrowsArgNullExceptionOnNullContext()
        {
            // Arrange
            var parser = new CSharpCodeParser();

            // Act and Assert
            var exception = Assert.Throws<InvalidOperationException>(() => parser.ParseBlock());
            Assert.Equal(RazorResources.Parser_Context_Not_Set, exception.Message);
        }