Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        public void Init()
        {
            ParseInformation parseInfo = new ParseInformation();

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

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