Skip to content

Commit

Permalink
feat: add cloud spanner connection support
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 384325792

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Jul 12 15:04:02 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: eba54922f4dd1a7e25ee44e0769a3af2ae2d2c0d
Source-Link: googleapis/googleapis@eba5492
  • Loading branch information
yoshi-automation authored and jskeet committed Jul 13, 2021
1 parent ead80b6 commit e425177
Show file tree
Hide file tree
Showing 4 changed files with 645 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public void CreateConnectionRequestObject()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.CreateConnection(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -79,6 +80,7 @@ public void CreateConnectionRequestObject()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.CreateConnectionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Connection>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -109,6 +111,7 @@ public void CreateConnection()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.CreateConnection(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -137,6 +140,7 @@ public void CreateConnection()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.CreateConnectionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Connection>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -167,6 +171,7 @@ public void CreateConnectionResourceNames()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.CreateConnection(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -195,6 +200,7 @@ public void CreateConnectionResourceNames()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.CreateConnectionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Connection>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -223,6 +229,7 @@ public void GetConnectionRequestObject()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.GetConnection(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand All @@ -249,6 +256,7 @@ public void GetConnectionRequestObject()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.GetConnectionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Connection>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -277,6 +285,7 @@ public void GetConnection()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.GetConnection(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand All @@ -303,6 +312,7 @@ public void GetConnection()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.GetConnectionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Connection>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -331,6 +341,7 @@ public void GetConnectionResourceNames()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.GetConnection(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand All @@ -357,6 +368,7 @@ public void GetConnectionResourceNames()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.GetConnectionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Connection>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -387,6 +399,7 @@ public void UpdateConnectionRequestObject()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.UpdateConnection(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -415,6 +428,7 @@ public void UpdateConnectionRequestObject()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.UpdateConnectionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Connection>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -445,6 +459,7 @@ public void UpdateConnection()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.UpdateConnection(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -473,6 +488,7 @@ public void UpdateConnection()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.UpdateConnectionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Connection>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -503,6 +519,7 @@ public void UpdateConnectionResourceNames()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.UpdateConnection(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down Expand Up @@ -531,6 +548,7 @@ public void UpdateConnectionResourceNames()
LastModifiedTime = 1315234198627015670L,
HasCredential = true,
Aws = new AwsProperties(),
CloudSpanner = new CloudSpannerProperties(),
};
mockGrpcClient.Setup(x => x.UpdateConnectionAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Connection>(stt::Task.FromResult(expectedResponse), null, null, null, null));
ConnectionServiceClient client = new ConnectionServiceClientImpl(mockGrpcClient.Object, null);
Expand Down

0 comments on commit e425177

Please sign in to comment.