diff --git a/Tests/GRPCProtobufCodeGenTests/ProtobufCodeGeneratorTests.swift b/Tests/GRPCProtobufCodeGenTests/ProtobufCodeGeneratorTests.swift index 431214a..c262d8b 100644 --- a/Tests/GRPCProtobufCodeGenTests/ProtobufCodeGeneratorTests.swift +++ b/Tests/GRPCProtobufCodeGenTests/ProtobufCodeGeneratorTests.swift @@ -92,20 +92,20 @@ final class ProtobufCodeGeneratorTests: XCTestCase { internal protocol Hello_World_Greeter_ClientProtocol: Sendable { /// Sends a greeting. func sayHello( - request: GRPCCore.ClientRequest.Single, + request: GRPCCore.ClientRequest, serializer: some GRPCCore.MessageSerializer, deserializer: some GRPCCore.MessageDeserializer, options: GRPCCore.CallOptions, - _ body: @Sendable @escaping (GRPCCore.ClientResponse.Single) async throws -> R + _ body: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> R ) async throws -> R where R: Sendable } @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension Hello_World_Greeter.ClientProtocol { internal func sayHello( - request: GRPCCore.ClientRequest.Single, + request: GRPCCore.ClientRequest, options: GRPCCore.CallOptions = .defaults, - _ body: @Sendable @escaping (GRPCCore.ClientResponse.Single) async throws -> R = { + _ body: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> R = { try $0.message } ) async throws -> R where R: Sendable { @@ -126,11 +126,11 @@ final class ProtobufCodeGeneratorTests: XCTestCase { _ message: Hello_World_HelloRequest, metadata: GRPCCore.Metadata = [:], options: GRPCCore.CallOptions = .defaults, - onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse.Single) async throws -> Result = { + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { try $0.message } ) async throws -> Result where Result: Sendable { - let request = GRPCCore.ClientRequest.Single( + let request = GRPCCore.ClientRequest( message: message, metadata: metadata ) @@ -153,11 +153,11 @@ final class ProtobufCodeGeneratorTests: XCTestCase { /// Sends a greeting. internal func sayHello( - request: GRPCCore.ClientRequest.Single, + request: GRPCCore.ClientRequest, serializer: some GRPCCore.MessageSerializer, deserializer: some GRPCCore.MessageDeserializer, options: GRPCCore.CallOptions = .defaults, - _ body: @Sendable @escaping (GRPCCore.ClientResponse.Single) async throws -> R = { + _ body: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> R = { try $0.message } ) async throws -> R where R: Sendable { @@ -242,9 +242,9 @@ final class ProtobufCodeGeneratorTests: XCTestCase { public protocol Helloworld_Greeter_StreamingServiceProtocol: GRPCCore.RegistrableRPCService { /// Sends a greeting. func sayHello( - request: GRPCCore.ServerRequest.Stream, + request: GRPCCore.StreamingServerRequest, context: GRPCCore.ServerContext - ) async throws -> GRPCCore.ServerResponse.Stream + ) async throws -> GRPCCore.StreamingServerResponse } /// Conformance to `GRPCCore.RegistrableRPCService`. @@ -271,23 +271,23 @@ final class ProtobufCodeGeneratorTests: XCTestCase { public protocol Helloworld_Greeter_ServiceProtocol: Helloworld_Greeter.StreamingServiceProtocol { /// Sends a greeting. func sayHello( - request: GRPCCore.ServerRequest.Single, + request: GRPCCore.ServerRequest, context: GRPCCore.ServerContext - ) async throws -> GRPCCore.ServerResponse.Single + ) async throws -> GRPCCore.ServerResponse } /// Partial conformance to `Helloworld_Greeter_StreamingServiceProtocol`. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension Helloworld_Greeter.ServiceProtocol { public func sayHello( - request: GRPCCore.ServerRequest.Stream, + request: GRPCCore.StreamingServerRequest, context: GRPCCore.ServerContext - ) async throws -> GRPCCore.ServerResponse.Stream { + ) async throws -> GRPCCore.StreamingServerResponse { let response = try await self.sayHello( - request: GRPCCore.ServerRequest.Single(stream: request), + request: GRPCCore.ServerRequest(stream: request), context: context ) - return GRPCCore.ServerResponse.Stream(single: response) + return GRPCCore.StreamingServerResponse(single: response) } } """ @@ -365,9 +365,9 @@ final class ProtobufCodeGeneratorTests: XCTestCase { package protocol Greeter_StreamingServiceProtocol: GRPCCore.RegistrableRPCService { /// Sends a greeting. func sayHello( - request: GRPCCore.ServerRequest.Stream, + request: GRPCCore.StreamingServerRequest, context: GRPCCore.ServerContext - ) async throws -> GRPCCore.ServerResponse.Stream + ) async throws -> GRPCCore.StreamingServerResponse } /// Conformance to `GRPCCore.RegistrableRPCService`. @@ -394,23 +394,23 @@ final class ProtobufCodeGeneratorTests: XCTestCase { package protocol Greeter_ServiceProtocol: Greeter.StreamingServiceProtocol { /// Sends a greeting. func sayHello( - request: GRPCCore.ServerRequest.Single, + request: GRPCCore.ServerRequest, context: GRPCCore.ServerContext - ) async throws -> GRPCCore.ServerResponse.Single + ) async throws -> GRPCCore.ServerResponse } /// Partial conformance to `Greeter_StreamingServiceProtocol`. @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension Greeter.ServiceProtocol { package func sayHello( - request: GRPCCore.ServerRequest.Stream, + request: GRPCCore.StreamingServerRequest, context: GRPCCore.ServerContext - ) async throws -> GRPCCore.ServerResponse.Stream { + ) async throws -> GRPCCore.StreamingServerResponse { let response = try await self.sayHello( - request: GRPCCore.ServerRequest.Single(stream: request), + request: GRPCCore.ServerRequest(stream: request), context: context ) - return GRPCCore.ServerResponse.Stream(single: response) + return GRPCCore.StreamingServerResponse(single: response) } } @@ -419,20 +419,20 @@ final class ProtobufCodeGeneratorTests: XCTestCase { package protocol Greeter_ClientProtocol: Sendable { /// Sends a greeting. func sayHello( - request: GRPCCore.ClientRequest.Single, + request: GRPCCore.ClientRequest, serializer: some GRPCCore.MessageSerializer, deserializer: some GRPCCore.MessageDeserializer, options: GRPCCore.CallOptions, - _ body: @Sendable @escaping (GRPCCore.ClientResponse.Single) async throws -> R + _ body: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> R ) async throws -> R where R: Sendable } @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) extension Greeter.ClientProtocol { package func sayHello( - request: GRPCCore.ClientRequest.Single, + request: GRPCCore.ClientRequest, options: GRPCCore.CallOptions = .defaults, - _ body: @Sendable @escaping (GRPCCore.ClientResponse.Single) async throws -> R = { + _ body: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> R = { try $0.message } ) async throws -> R where R: Sendable { @@ -453,11 +453,11 @@ final class ProtobufCodeGeneratorTests: XCTestCase { _ message: HelloRequest, metadata: GRPCCore.Metadata = [:], options: GRPCCore.CallOptions = .defaults, - onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse.Single) async throws -> Result = { + onResponse handleResponse: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> Result = { try $0.message } ) async throws -> Result where Result: Sendable { - let request = GRPCCore.ClientRequest.Single( + let request = GRPCCore.ClientRequest( message: message, metadata: metadata ) @@ -480,11 +480,11 @@ final class ProtobufCodeGeneratorTests: XCTestCase { /// Sends a greeting. package func sayHello( - request: GRPCCore.ClientRequest.Single, + request: GRPCCore.ClientRequest, serializer: some GRPCCore.MessageSerializer, deserializer: some GRPCCore.MessageDeserializer, options: GRPCCore.CallOptions = .defaults, - _ body: @Sendable @escaping (GRPCCore.ClientResponse.Single) async throws -> R = { + _ body: @Sendable @escaping (GRPCCore.ClientResponse) async throws -> R = { try $0.message } ) async throws -> R where R: Sendable {