forked from googleapis/gapic-generator-csharp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Disable testing of snippets rather than having all the files with "test disabled" - Remove the build test (which would require us to have snippet csproj files) - Move the fakes out of the folder where we expect generated code to live - Test against the full generated file instead of just small parts of it
- Loading branch information
Showing
20 changed files
with
515 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright 2019 Google Inc. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using Google.LongRunning; | ||
using Google.Protobuf.Reflection; | ||
using Grpc.Core; | ||
using System; | ||
|
||
// Disable warning: Missing XML comment on public members. | ||
// Required to successfully build this generated test project. | ||
#pragma warning disable 1591 | ||
|
||
namespace Testing.Lro; | ||
|
||
// gRPC fakes | ||
public static partial class Lro | ||
{ | ||
public static ServiceDescriptor Descriptor => null; | ||
public partial class LroClient | ||
{ | ||
private CallInvoker CallInvoker => throw new NotImplementedException(); | ||
|
||
public LroClient(CallInvoker callInvoker) { } | ||
public virtual AsyncUnaryCall<Operation> SignatureMethodAsync(Request request, CallOptions options) => throw new NotImplementedException(); | ||
public virtual Operation SignatureMethod(Request request, CallOptions options) => throw new NotImplementedException(); | ||
public virtual AsyncUnaryCall<Operation> ResourcedMethodAsync(ResourceRequest request, CallOptions options) => throw new NotImplementedException(); | ||
public virtual Operation ResourcedMethod(ResourceRequest request, CallOptions options) => throw new NotImplementedException(); | ||
} | ||
} | ||
|
||
// Protobuf fakes | ||
public class Request : ProtoMsgFake<Request> | ||
{ | ||
public string Name { get; set; } | ||
} | ||
|
||
public partial class ResourceRequest : ProtoMsgFake<ResourceRequest> | ||
{ | ||
public string Name { get; set; } | ||
} | ||
|
||
public class LroResponse : ProtoMsgFake<LroResponse> { | ||
public class Types | ||
{ | ||
public class Nested : ProtoMsgFake<Nested> { } | ||
} | ||
} | ||
|
||
public class LroMetadata : ProtoMsgFake<LroMetadata> | ||
{ | ||
public class Types | ||
{ | ||
public class Nested : ProtoMsgFake<Nested> { } | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
...s/ProtoTests/Lro/Testing.Lro.GeneratedSnippets/LroClient.ResourcedMethodAsyncSnippet.g.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...Lro/Testing.Lro.GeneratedSnippets/LroClient.ResourcedMethodRequestObjectAsyncSnippet.g.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...ests/Lro/Testing.Lro.GeneratedSnippets/LroClient.ResourcedMethodRequestObjectSnippet.g.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...Lro/Testing.Lro.GeneratedSnippets/LroClient.ResourcedMethodResourceNamesAsyncSnippet.g.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...ests/Lro/Testing.Lro.GeneratedSnippets/LroClient.ResourcedMethodResourceNamesSnippet.g.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
....Tests/ProtoTests/Lro/Testing.Lro.GeneratedSnippets/LroClient.ResourcedMethodSnippet.g.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...s/ProtoTests/Lro/Testing.Lro.GeneratedSnippets/LroClient.SignatureMethodAsyncSnippet.g.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...Lro/Testing.Lro.GeneratedSnippets/LroClient.SignatureMethodRequestObjectAsyncSnippet.g.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...ests/Lro/Testing.Lro.GeneratedSnippets/LroClient.SignatureMethodRequestObjectSnippet.g.cs
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
....Tests/ProtoTests/Lro/Testing.Lro.GeneratedSnippets/LroClient.SignatureMethodSnippet.g.cs
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
...r.Tests/ProtoTests/Lro/Testing.Lro.GeneratedSnippets/Testing.Lro.GeneratedSnippets.csproj
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...ator.Tests/ProtoTests/Lro/Testing.Lro.GeneratedSnippets/snippet_metadata_testing.lro.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
Google.Api.Generator.Tests/ProtoTests/Lro/Testing.Lro.Snippets/LroClientSnippets.g.cs
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
Google.Api.Generator.Tests/ProtoTests/Lro/Testing.Lro.Snippets/Testing.Lro.Snippets.csproj
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.