public void ResolveResultContainsConsoleClass()
        {
            List <ICompletionEntry> items = GetCompletionItems();
            IClass consoleClass           = PythonCompletionItemsHelper.FindClassFromCollection("Console", items);

            Assert.IsNotNull(consoleClass);
        }
        public void MockProjectContentSystemNamespaceContentsIncludesConsoleClass()
        {
            List <ICompletionEntry> items = projectContent.GetNamespaceContents("System");
            IClass consoleClass           = PythonCompletionItemsHelper.FindClassFromCollection("Console", items);

            Assert.IsNotNull(consoleClass);
        }
예제 #3
0
        public void CompletionItemsContainsDateClass()
        {
            List <ICompletionEntry> items = resolveResult.GetCompletionData(projectContent);
            IClass c = PythonCompletionItemsHelper.FindClassFromCollection("datetime", items);

            Assert.IsNotNull(c);
        }
예제 #4
0
        public void FindClassFromArrayReturnsExpectedClass()
        {
            DefaultClass c = CreateClass();

            ArrayList items = new ArrayList();

            items.Add(c);

            Assert.AreEqual(c, PythonCompletionItemsHelper.FindClassFromCollection("Test", items));
        }
예제 #5
0
        public void FindClassFromArrayReturnsExpectedNullForUnknownClassName()
        {
            DefaultClass c = CreateClass();

            ArrayList items = new ArrayList();

            items.Add(c);

            Assert.IsNull(PythonCompletionItemsHelper.FindClassFromCollection("unknown-class-name", items));
        }