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 CSharpMembersCompletion()
        {
            var provider = RazorCompletionTesting.CreateProvider("@{ Char.$ }", true);

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

            Assert.IsNotNull(provider);
            Assert.AreEqual(2, provider.Count);
        }
Exemple #4
0
        public async Task RazorDirectivesAndStatementsCompletion()
        {
            var provider = await 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"));

            // TODO: Roslyn - the following are not working.
            // They work for Ctrl+Space completion but not with completion as you type.
//			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"));
        }
Exemple #5
0
        public async Task CSharpMembersCtrlSpaceCompletion()
        {
            var provider = await RazorCompletionTesting.CreateRazorCtrlSpaceProvider("@{ Char.Is$ }", true);

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

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

            Assert.IsNotNull(provider);
            Assert.IsNotNull(provider.Find("p"));
            Assert.IsNotNull(provider.Find("div"));
        }
Exemple #8
0
        public async Task CSharpIdentifiersCompletion()
        {
            var provider = await RazorCompletionTesting.CreateProvider("@{ i$ }", true);

            Assert.IsNotNull(provider);
            Assert.IsNotNull(provider.Find("int"));
            Assert.IsNotNull(provider.Find("var"));
        }
Exemple #9
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"));
        }