Exemplo n.º 1
0
 public void VerifyCompletionListForLoadMembers()
 {
     using var temporaryTextFile = new TemporaryTextFile(
               "c.csx",
               "int x = 2; class Complex { public int goo() { return 4; } }");
     temporaryTextFile.Create();
     VisualStudio.InteractiveWindow.SubmitText(string.Format("#load \"{0}\"", temporaryTextFile.FullName));
     VisualStudio.InteractiveWindow.InvokeCompletionList();
     VisualStudio.InteractiveWindow.Verify.CompletionItemsExist("x", "Complex");
     VisualStudio.SendKeys.Send(VirtualKey.Escape);
 }
Exemplo n.º 2
0
 public void VerifyHashLoadDirective()
 {
     using (var temporaryTextFile = new TemporaryTextFile(
                "directivesScenario6.csx",
                "System.Console.WriteLine(2);"))
     {
         temporaryTextFile.Create();
         VisualStudio.InteractiveWindow.SubmitText(string.Format("#load \"{0}\"", temporaryTextFile.FullName));
         VisualStudio.InteractiveWindow.WaitForLastReplOutput("2");
         VisualStudio.InteractiveWindow.SubmitText("#load text");
         VisualStudio.InteractiveWindow.WaitForLastReplOutput("CS7010: Quoted file name expected");
     }
 }
Exemplo n.º 3
0
 public void VerifyCompletionListForLoadMembers()
 {
     using (var temporaryTextFile = new TemporaryTextFile(
                "c.csx",
                "int x = 2; class Complex { public int foo() { return 4; } }"))
     {
         temporaryTextFile.Create();
         SubmitText(string.Format("#load \"{0}\"", temporaryTextFile.FullName));
         InvokeCompletionList();
         VerifyCompletionItemExists("x", "Complex");
         SendKeys(VirtualKey.Escape);
     }
 }
Exemplo n.º 4
0
        public void VerifyLocalDeclarationInCsxFileWithTheSameNameHidesImportedMembersFromHashR()
        {
            VisualStudio.InteractiveWindow.SubmitText("#r \"System.Numerics\"");
            VisualStudio.InteractiveWindow.SubmitText("using System.Numerics;");
            using (var temporaryTextFile = new TemporaryTextFile(
                       "directivesScenario4.csx",
                       "class Complex { public int goo() { return 4; } }"))
            {
                temporaryTextFile.Create();
                VisualStudio.InteractiveWindow.SubmitText(string.Format("#load \"{0}\"", temporaryTextFile.FullName));
                VisualStudio.InteractiveWindow.SubmitText(@"var comp = new Complex();
comp.goo()");
                VisualStudio.InteractiveWindow.WaitForLastReplOutput("4");
            }
        }