@@ -71,7 +71,8 @@ final class LanguageServerCodeFileDocumentTests: XCTestCase {
7171 ) ,
7272 lspPid: - 1 ,
7373 serverCapabilities: capabilities,
74- rootPath: tempTestDir
74+ rootPath: tempTestDir,
75+ logContainer: LanguageServerLogContainer ( language: . swift)
7576 )
7677 _ = try await server. lspInstance. initializeIfNeeded ( )
7778 return ( connection: bufferingConnection, server: server)
@@ -231,13 +232,13 @@ final class LanguageServerCodeFileDocumentTests: XCTestCase {
231232 let ( connection, server) = try await makeTestServer ( )
232233 // Create a CodeFileDocument to test with, attach it to the workspace and file
233234 let codeFile = try await openCodeFile ( for: server, connection: connection, file: file, syncOption: option)
234- XCTAssertNotNil ( server . openFiles . contentCoordinator ( for : codeFile ) )
235- server . openFiles . contentCoordinator ( for : codeFile ) ? . setUpUpdatesTask ( )
235+ XCTAssertNotNil ( codeFile . languageServerObjects . textCoordinator . languageServer )
236+ codeFile . languageServerObjects . textCoordinator . setUpUpdatesTask ( )
236237 codeFile. content? . replaceString ( in: . zero, with: #"func testFunction() -> String { "Hello " }"# )
237238
238239 let textView = TextView ( string: " " )
239240 textView. setTextStorage ( codeFile. content!)
240- textView. delegate = server . openFiles . contentCoordinator ( for : codeFile )
241+ textView. delegate = codeFile . languageServerObjects . textCoordinator
241242
242243 textView. replaceCharacters ( in: NSRange ( location: 39 , length: 0 ) , with: " Worlld " )
243244 textView. replaceCharacters ( in: NSRange ( location: 39 , length: 6 ) , with: " " )
@@ -289,13 +290,13 @@ final class LanguageServerCodeFileDocumentTests: XCTestCase {
289290 let ( connection, server) = try await makeTestServer ( )
290291 let codeFile = try await openCodeFile ( for: server, connection: connection, file: file, syncOption: option)
291292
292- XCTAssertNotNil ( server . openFiles . contentCoordinator ( for : codeFile ) )
293- server . openFiles . contentCoordinator ( for : codeFile ) ? . setUpUpdatesTask ( )
293+ XCTAssertNotNil ( codeFile . languageServerObjects . textCoordinator . languageServer )
294+ codeFile . languageServerObjects . textCoordinator . setUpUpdatesTask ( )
294295 codeFile. content? . replaceString ( in: . zero, with: #"func testFunction() -> String { "Hello " }"# )
295296
296297 let textView = TextView ( string: " " )
297298 textView. setTextStorage ( codeFile. content!)
298- textView. delegate = server . openFiles . contentCoordinator ( for : codeFile)
299+ textView. delegate = codeFile. languageServerObjects . textCoordinator
299300 textView. replaceCharacters ( in: NSRange ( location: 39 , length: 0 ) , with: " Worlld " )
300301 textView. replaceCharacters ( in: NSRange ( location: 39 , length: 6 ) , with: " " )
301302 textView. replaceCharacters ( in: NSRange ( location: 39 , length: 0 ) , with: " World " )
0 commit comments