예제 #1
0
        public void GetCompletionItemsFromModule_UnknownModule_OnlyImportAllItemsCompletionItemReturned()
        {
            List <ICompletionEntry> items         = completion.GetCompletionItemsFromModule("unknown");
            List <ICompletionEntry> expectedItems = new List <ICompletionEntry>();

            expectedItems.Add(new NamespaceEntry("*"));
            Assert.AreEqual(expectedItems, items);
        }
        public void FromDotNetSystemLibraryGetCompletionItemsReturnsAllClassesFromSystemNamespace()
        {
            ArrayList items         = completion.GetCompletionItemsFromModule("System");
            ArrayList expectedItems = new ArrayList();

            expectedItems.Add(c);

            Assert.AreEqual(expectedItems, items);
        }
        public void GetCompletionItemsFromModule_DotNetSystemLibrary_ReturnsAllClassesFromSystemNamespaceAndAsteriskForImportAll()
        {
            List <ICompletionEntry> items         = completion.GetCompletionItemsFromModule("System");
            List <ICompletionEntry> expectedItems = new List <ICompletionEntry>();

            expectedItems.Add(c);
            expectedItems.Add(new NamespaceEntry("*"));

            Assert.AreEqual(expectedItems, items);
        }
예제 #4
0
        public void Init()
        {
            ParseInformation parseInfo = new ParseInformation();

            projectContent  = new MockProjectContent();
            completion      = new PythonImportCompletion(projectContent);
            completionItems = completion.GetCompletionItemsFromModule("sys");
        }
예제 #5
0
        public void FromUnknownLibraryNoCompletionItemsReturned()
        {
            ArrayList items = completion.GetCompletionItemsFromModule("unknown");

            Assert.AreEqual(0, items.Count);
        }