Exemple #1
0
        public void NestedHtmlTagsCompletion()
        {
            var provider = RazorCompletionTesting.CreateProvider("<div><ul><$ </ul></div>", false);

            Assert.IsNotNull(provider);
            Assert.IsNotNull(provider.Find("li"));
        }
Exemple #2
0
        public void CSharpParametersCompletion()
        {
            var provider = RazorCompletionTesting.CreateProvider("@{ Char.IsLetter($ }");

            Assert.IsNotNull(provider);
            Assert.AreEqual(2, provider.Count);
        }
Exemple #3
0
        public void CSharpMembersCtrlSpaceCompletion()
        {
            var provider = RazorCompletionTesting.CreateRazorCtrlSpaceProvider("@{ Char.Is$ }", true);

            Assert.IsNotNull(provider);
            Assert.IsNotNull(provider.Find("IsLetter"));
        }
Exemple #4
0
        public void CSharpIdentifiersCtrlSpaceCompletion()
        {
            var provider = RazorCompletionTesting.CreateRazorCtrlSpaceProvider("@{ $ }", true);

            Assert.IsNotNull(provider);
            Assert.IsNotNull(provider.Find("int"));
            Assert.IsNotNull(provider.Find("var"));
        }
Exemple #5
0
        public void HtmlTagsCompletion()
        {
            var provider = RazorCompletionTesting.CreateProvider("<$", false);

            Assert.IsNotNull(provider);
            Assert.IsNotNull(provider.Find("p"));
            Assert.IsNotNull(provider.Find("div"));
        }
Exemple #6
0
        public void RazorDirectivesAndStatementsCompletion()
        {
            var provider = RazorCompletionTesting.CreateProvider("@m$", true);

            Assert.IsNotNull(provider);
            Assert.IsNotNull(provider.Find("model"));
            Assert.IsNotNull(provider.Find("sessionstate"));
            Assert.IsNotNull(provider.Find("using"));
            Assert.IsNotNull(provider.Find("layout"));
            Assert.IsNotNull(provider.Find("section"));
            Assert.IsNotNull(provider.Find("functions"));
            Assert.IsNotNull(provider.Find("helper"));
            Assert.IsNotNull(provider.Find("inherits"));
            Assert.IsNotNull(provider.Find("for"));
            Assert.IsNotNull(provider.Find("foreach"));
            Assert.IsNotNull(provider.Find("while"));
            Assert.IsNotNull(provider.Find("do"));
            Assert.IsNotNull(provider.Find("lock"));
            Assert.IsNotNull(provider.Find("switch"));
            Assert.IsNotNull(provider.Find("if"));
            Assert.IsNotNull(provider.Find("try"));
        }