@@ -7,6 +7,8 @@ open Contracts
77open LSPFSharpLintService
88open LSPFSharpLintServiceTypes
99
10+ // fsharplint:disable RedundantNewKeyword
11+
1012let (</>) x y = Path.Combine( x, y)
1113
1214let basePath = TestContext.CurrentContext.TestDirectory </> " .." </> " .." </> " .." </> " .." </> " .."
@@ -37,7 +39,7 @@ type ToolLocationOverride(toolStatus: ToolStatus) =
3739 if File.Exists tempFolder then
3840 File.Delete tempFolder
3941
40- let runVersionCall filePath ( service : FSharpLintService ) =
42+ let runVersionCall filePath ( service : IFSharpLintService ) =
4143 async {
4244 let request =
4345 {
@@ -53,7 +55,7 @@ let TestDaemonNotFound() =
5355 using ( new ToolLocationOverride( ToolStatus.NotAvailable)) <| fun _ ->
5456
5557 let testHintsFile = basePath </> " tests" </> " FSharpLint.FunctionalTest.TestedProject" </> " FSharpLint.FunctionalTest.TestedProject.NetCore" </> " TestHints.fs"
56- let fsharpLintService : FSharpLintService = new LSPFSharpLintService() :> FSharpLintService
58+ let fsharpLintService : IFSharpLintService = new LSPFSharpLintService() :> IFSharpLintService
5759 let versionResponse = runVersionCall testHintsFile fsharpLintService
5860
5961 Assert.AreEqual( LanguagePrimitives.EnumToValue FSharpLintResponseCode.ErrToolNotFound, versionResponse.Code)
@@ -63,7 +65,7 @@ let TestDaemonVersion() =
6365 using ( new ToolLocationOverride( ToolStatus.Available)) <| fun _ ->
6466
6567 let testHintsFile = basePath </> " tests" </> " FSharpLint.FunctionalTest.TestedProject" </> " FSharpLint.FunctionalTest.TestedProject.NetCore" </> " TestHints.fs"
66- let fsharpLintService : FSharpLintService = new LSPFSharpLintService() :> FSharpLintService
68+ let fsharpLintService : IFSharpLintService = new LSPFSharpLintService() :> IFSharpLintService
6769 let versionResponse = runVersionCall testHintsFile fsharpLintService
6870
6971 match versionResponse.Result with
@@ -77,7 +79,7 @@ let TestFilePathShouldBeAbsolute() =
7779 using ( new ToolLocationOverride( ToolStatus.Available)) <| fun _ ->
7880
7981 let testHintsFile = " .." </> " tests" </> " FSharpLint.FunctionalTest.TestedProject" </> " FSharpLint.FunctionalTest.TestedProject.NetCore" </> " TestHints.fs"
80- let fsharpLintService : FSharpLintService = new LSPFSharpLintService() :> FSharpLintService
82+ let fsharpLintService : IFSharpLintService = new LSPFSharpLintService() :> IFSharpLintService
8183 let versionResponse = runVersionCall testHintsFile fsharpLintService
8284
8385 Assert.AreEqual( LanguagePrimitives.EnumToValue FSharpLintResponseCode.ErrFilePathIsNotAbsolute, versionResponse.Code)
@@ -87,7 +89,7 @@ let TestFileShouldExists() =
8789 using ( new ToolLocationOverride( ToolStatus.Available)) <| fun _ ->
8890
8991 let testHintsFile = basePath </> " tests" </> " FSharpLint.FunctionalTest.TestedProject" </> " FSharpLint.FunctionalTest.TestedProject.NetCore" </> " TestHintsOOOPS.fs"
90- let fsharpLintService : FSharpLintService = new LSPFSharpLintService() :> FSharpLintService
92+ let fsharpLintService : IFSharpLintService = new LSPFSharpLintService() :> IFSharpLintService
9193 let versionResponse = runVersionCall testHintsFile fsharpLintService
9294
9395 Assert.AreEqual( LanguagePrimitives.EnumToValue FSharpLintResponseCode.ErrFileNotFound, versionResponse.Code)
0 commit comments