@@ -473,5 +473,55 @@ public void DeleteAgentResourceNames()
473473 await client . DeleteAgentAsync ( request . ParentAsProjectName , st ::CancellationToken . None ) ;
474474 mockGrpcClient . VerifyAll ( ) ;
475475 }
476+
477+ [ xunit ::FactAttribute ]
478+ public void GetValidationResultRequestObject ( )
479+ {
480+ moq ::Mock < Agents . AgentsClient > mockGrpcClient = new moq ::Mock < Agents . AgentsClient > ( moq ::MockBehavior . Strict ) ;
481+ mockGrpcClient . Setup ( x => x . CreateOperationsClient ( ) ) . Returns ( new moq ::Mock < lro ::Operations . OperationsClient > ( ) . Object ) ;
482+ GetValidationResultRequest request = new GetValidationResultRequest
483+ {
484+ Parent = "parent7858e4d0" ,
485+ LanguageCode = "language_code2f6c7160" ,
486+ } ;
487+ ValidationResult expectedResponse = new ValidationResult
488+ {
489+ ValidationErrors =
490+ {
491+ new ValidationError ( ) ,
492+ } ,
493+ } ;
494+ mockGrpcClient . Setup ( x => x . GetValidationResult ( request , moq ::It . IsAny < grpccore ::CallOptions > ( ) ) ) . Returns ( expectedResponse ) ;
495+ AgentsClient client = new AgentsClientImpl ( mockGrpcClient . Object , null ) ;
496+ ValidationResult response = client . GetValidationResult ( request ) ;
497+ xunit ::Assert . Same ( expectedResponse , response ) ;
498+ mockGrpcClient . VerifyAll ( ) ;
499+ }
500+
501+ [ xunit ::FactAttribute ]
502+ public async stt ::Task GetValidationResultRequestObjectAsync ( )
503+ {
504+ moq ::Mock < Agents . AgentsClient > mockGrpcClient = new moq ::Mock < Agents . AgentsClient > ( moq ::MockBehavior . Strict ) ;
505+ mockGrpcClient . Setup ( x => x . CreateOperationsClient ( ) ) . Returns ( new moq ::Mock < lro ::Operations . OperationsClient > ( ) . Object ) ;
506+ GetValidationResultRequest request = new GetValidationResultRequest
507+ {
508+ Parent = "parent7858e4d0" ,
509+ LanguageCode = "language_code2f6c7160" ,
510+ } ;
511+ ValidationResult expectedResponse = new ValidationResult
512+ {
513+ ValidationErrors =
514+ {
515+ new ValidationError ( ) ,
516+ } ,
517+ } ;
518+ mockGrpcClient . Setup ( x => x . GetValidationResultAsync ( request , moq ::It . IsAny < grpccore ::CallOptions > ( ) ) ) . Returns ( new grpccore ::AsyncUnaryCall < ValidationResult > ( stt ::Task . FromResult ( expectedResponse ) , null , null , null , null ) ) ;
519+ AgentsClient client = new AgentsClientImpl ( mockGrpcClient . Object , null ) ;
520+ ValidationResult responseCallSettings = await client . GetValidationResultAsync ( request , gaxgrpc ::CallSettings . FromCancellationToken ( st ::CancellationToken . None ) ) ;
521+ xunit ::Assert . Same ( expectedResponse , responseCallSettings ) ;
522+ ValidationResult responseCancellationToken = await client . GetValidationResultAsync ( request , st ::CancellationToken . None ) ;
523+ xunit ::Assert . Same ( expectedResponse , responseCancellationToken ) ;
524+ mockGrpcClient . VerifyAll ( ) ;
525+ }
476526 }
477527}
0 commit comments