public async Task CheckAllFiles()
        {
            var workspace = TestHelpers.CreateSimpleWorkspace(new Dictionary <string, string>
            {
                { "a.cs", "class C1 { int n = true; }" },
                { "b.cs", "class C2 { int n = true; }" },
            });

            var controller = new OmnisharpController(workspace, new FakeOmniSharpOptions());
            var quickFixes = await controller.CodeCheck(new Request());

            Assert.Equal(2, quickFixes.QuickFixes.Count());
        }
Exemplo n.º 2
0
        public async Task CheckAllFiles()
        {
            var workspace = TestHelpers.CreateSimpleWorkspace(new Dictionary<string, string>
            {
                { "a.cs", "class C1 { int n = true; }" },
                { "b.cs", "class C2 { int n = true; }" },
            });

            var controller = new OmnisharpController(workspace, new FakeOmniSharpOptions());
            var quickFixes = await controller.CodeCheck(new Request());

            Assert.Equal(2, quickFixes.QuickFixes.Count());
        }
Exemplo n.º 3
0
        public async Task CodeCheckSpecifiedFileOnly()
        {
            var workspace = TestHelpers.CreateSimpleWorkspace(new Dictionary<string, string>
            {
                { "a.cs", "class C { int n = true; }" }
            });

            var controller = new OmnisharpController(workspace, new FakeOmniSharpOptions());
            var quickFixes = await controller.CodeCheck(new Request() { FileName = "a.cs" });

            Assert.Equal(1, quickFixes.QuickFixes.Count());
            Assert.Equal("a.cs", quickFixes.QuickFixes.First().FileName);
        }
        public async Task CodeCheckSpecifiedFileOnly()
        {
            var workspace = TestHelpers.CreateSimpleWorkspace(new Dictionary <string, string>
            {
                { "a.cs", "class C { int n = true; }" }
            });

            var controller = new OmnisharpController(workspace, new FakeOmniSharpOptions());
            var quickFixes = await controller.CodeCheck(new Request()
            {
                FileName = "a.cs"
            });

            Assert.Equal(1, quickFixes.QuickFixes.Count());
            Assert.Equal("a.cs", quickFixes.QuickFixes.First().FileName);
        }