public void GetMobileAppCategoryConstant2() { Mock <MobileAppCategoryConstantService.MobileAppCategoryConstantServiceClient> mockGrpcClient = new Mock <MobileAppCategoryConstantService.MobileAppCategoryConstantServiceClient>(MockBehavior.Strict); GetMobileAppCategoryConstantRequest request = new GetMobileAppCategoryConstantRequest { ResourceName = new MobileAppCategoryConstantName("[MOBILE_APP_CATEGORY_CONSTANT]").ToString(), }; MobileAppCategoryConstant expectedResponse = new MobileAppCategoryConstant { ResourceName = "resourceName2625949903", }; mockGrpcClient.Setup(x => x.GetMobileAppCategoryConstant(request, It.IsAny <CallOptions>())) .Returns(expectedResponse); MobileAppCategoryConstantServiceClient client = new MobileAppCategoryConstantServiceClientImpl(mockGrpcClient.Object, null); MobileAppCategoryConstant response = client.GetMobileAppCategoryConstant(request); Assert.AreEqual(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public void GetMobileAppCategoryConstant() { moq::Mock <MobileAppCategoryConstantService.MobileAppCategoryConstantServiceClient> mockGrpcClient = new moq::Mock <MobileAppCategoryConstantService.MobileAppCategoryConstantServiceClient>(moq::MockBehavior.Strict); GetMobileAppCategoryConstantRequest request = new GetMobileAppCategoryConstantRequest { ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), }; gagvr::MobileAppCategoryConstant expectedResponse = new gagvr::MobileAppCategoryConstant { ResourceNameAsMobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), Id = 1958153144, MobileAppCategoryConstantName = gagvr::MobileAppCategoryConstantName.FromMobileAppCategoryConstant("[MOBILE_APP_CATEGORY_CONSTANT]"), }; mockGrpcClient.Setup(x => x.GetMobileAppCategoryConstant(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse); MobileAppCategoryConstantServiceClient client = new MobileAppCategoryConstantServiceClientImpl(mockGrpcClient.Object, null); gagvr::MobileAppCategoryConstant response = client.GetMobileAppCategoryConstant(request.ResourceName); Assert.AreEqual(expectedResponse, response); mockGrpcClient.VerifyAll(); }