Skip to content

Commit cc827ea

Browse files
committed
fix
1 parent 11aea23 commit cc827ea

File tree

4 files changed

+66
-13
lines changed

4 files changed

+66
-13
lines changed

src/WireMock.Net/WireMock.Net.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard1.3' and '$(TargetFramework)' != 'net451' and '$(TargetFramework)' != 'net452' and '$(TargetFramework)' != 'net46' and '$(TargetFramework)' != 'net461'">
147147
<PackageReference Include="GraphQL.NewtonsoftJson" Version="8.2.1" />
148148
<PackageReference Include="MimeKitLite" Version="4.1.0.1" />
149-
<PackageReference Include="ProtoBufJsonConverter" Version="0.6.0" />
149+
<PackageReference Include="ProtoBufJsonConverter" Version="0.7.0-preview-02" />
150150
</ItemGroup>
151151

152152
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">

test/WireMock.Net.Tests/Grpc/WireMockServerTests.Grpc.cs

+12-12
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ public async Task WireMockServer_WithBodyAsProtoBuf_WithWellKnownTypes_Timestamp
227227
{
228228
ts = new
229229
{
230-
seconds = 1722301323,
231-
nanos = 12300
230+
Seconds = 1722301323,
231+
Nanos = 12300
232232
}
233233
}
234234
)
@@ -269,8 +269,8 @@ public async Task WireMockServer_WithBodyAsProtoBuf_WithWellKnownTypes_Duration(
269269
{
270270
du = new
271271
{
272-
seconds = 1722301323,
273-
nanos = 12300
272+
Seconds = 1722301323,
273+
Nanos = 12300
274274
}
275275
}
276276
)
@@ -539,12 +539,12 @@ public async Task WireMockServer_WithBodyAsProtoBuf_WithWellKnownTypes_Timestamp
539539
.WithHeader("Content-Type", "application/grpc")
540540
.WithTrailingHeader("grpc-status", "0")
541541
.WithBodyAsProtoBuf(definition, "greet.MyMessageTimestamp",
542-
new
542+
new MyMessageTimestamp
543543
{
544-
ts = new
544+
Ts = new Timestamp
545545
{
546-
seconds,
547-
nanos
546+
Seconds = seconds,
547+
Nanos = nanos
548548
}
549549
}
550550
)
@@ -580,12 +580,12 @@ public async Task WireMockServer_WithBodyAsProtoBuf_WithWellKnownTypes_Duration_
580580
.WithHeader("Content-Type", "application/grpc")
581581
.WithTrailingHeader("grpc-status", "0")
582582
.WithBodyAsProtoBuf(definition, "greet.MyMessageDuration",
583-
new
583+
new MyMessageDuration
584584
{
585-
du = new
585+
Du = new Duration
586586
{
587-
seconds,
588-
nanos
587+
Seconds = seconds,
588+
Nanos = nanos
589589
}
590590
}
591591
)
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
syntax = "proto3";
2+
3+
import "google/protobuf/timestamp.proto";
4+
5+
package Policy2;
6+
7+
service PolicyService2 {
8+
rpc GetVersion (GetVersionRequest) returns (GetVersionResponse);
9+
rpc GetVersion2 (GetVersion2Request) returns (GetVersion2Response);
10+
}
11+
12+
// REQUEST/RESPONSE DEFINITIONS
13+
14+
message GetVersion2Request {
15+
Client Client = 1;
16+
17+
}
18+
message GetVersion2Response {
19+
string Version = 1;
20+
21+
}
22+
message GetVersionRequest {
23+
Client Client = 1;
24+
25+
}
26+
message GetVersionResponse {
27+
string Version = 1;
28+
google.protobuf.Timestamp DateHired = 2;
29+
}
30+
31+
message Client {
32+
string CorrelationId = 1;
33+
enum Clients {
34+
Unknown = 0;
35+
QMS = 1;
36+
BillingCenter = 2;
37+
PAS = 3;
38+
Payroll = 4;
39+
Portal = 5;
40+
SFO = 6;
41+
QuoteAndBind = 7;
42+
LegacyConversion = 8;
43+
BindNow = 9;
44+
PaymentPortal = 10 ;
45+
PricingEngine = 11;
46+
}
47+
Clients ClientName = 2;
48+
}

test/WireMock.Net.Tests/WireMock.Net.Tests.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
</PackageReference>
114114

115115
<Protobuf Include="Grpc\greet.proto" GrpcServices="Client" />
116+
<Protobuf Include="Grpc\policy.proto" GrpcServices="Client" />
116117
</ItemGroup>
117118

118119
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net8.0'">
@@ -132,6 +133,10 @@
132133
<None Update="cert.pem">
133134
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
134135
</None>
136+
<None Update="Grpc\policy.proto">
137+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
138+
<GrpcServices>Client</GrpcServices>
139+
</None>
135140
<None Update="Grpc\greet.proto">
136141
<GrpcServices>Client</GrpcServices>
137142
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

0 commit comments

Comments
 (0)