@@ -26,6 +26,100 @@ namespace Google.Analytics.Data.V1Beta.Tests
26
26
/// <summary>Generated unit tests.</summary>
27
27
public sealed class GeneratedBetaAnalyticsDataClientTest
28
28
{
29
+ [ xunit ::FactAttribute ]
30
+ public void RunReportRequestObject ( )
31
+ {
32
+ moq ::Mock < BetaAnalyticsData . BetaAnalyticsDataClient > mockGrpcClient = new moq ::Mock < BetaAnalyticsData . BetaAnalyticsDataClient > ( moq ::MockBehavior . Strict ) ;
33
+ RunReportRequest request = new RunReportRequest
34
+ {
35
+ Property = "propertyc9b48d1a" ,
36
+ Dimensions = { new Dimension ( ) , } ,
37
+ Metrics = { new Metric ( ) , } ,
38
+ DateRanges = { new DateRange ( ) , } ,
39
+ DimensionFilter = new FilterExpression ( ) ,
40
+ MetricFilter = new FilterExpression ( ) ,
41
+ Offset = - 4389998161825790342L ,
42
+ Limit = 7494001492025909162L ,
43
+ MetricAggregations =
44
+ {
45
+ MetricAggregation . Minimum ,
46
+ } ,
47
+ OrderBys = { new OrderBy ( ) , } ,
48
+ CurrencyCode = "currency_code7f81e352" ,
49
+ CohortSpec = new CohortSpec ( ) ,
50
+ KeepEmptyRows = true ,
51
+ ReturnPropertyQuota = true ,
52
+ } ;
53
+ RunReportResponse expectedResponse = new RunReportResponse
54
+ {
55
+ DimensionHeaders =
56
+ {
57
+ new DimensionHeader ( ) ,
58
+ } ,
59
+ MetricHeaders = { new MetricHeader ( ) , } ,
60
+ Rows = { new Row ( ) , } ,
61
+ Totals = { new Row ( ) , } ,
62
+ Maximums = { new Row ( ) , } ,
63
+ Minimums = { new Row ( ) , } ,
64
+ RowCount = 743251772 ,
65
+ Metadata = new ResponseMetaData ( ) ,
66
+ PropertyQuota = new PropertyQuota ( ) ,
67
+ } ;
68
+ mockGrpcClient . Setup ( x => x . RunReport ( request , moq ::It . IsAny < grpccore ::CallOptions > ( ) ) ) . Returns ( expectedResponse ) ;
69
+ BetaAnalyticsDataClient client = new BetaAnalyticsDataClientImpl ( mockGrpcClient . Object , null ) ;
70
+ RunReportResponse response = client . RunReport ( request ) ;
71
+ xunit ::Assert . Same ( expectedResponse , response ) ;
72
+ mockGrpcClient . VerifyAll ( ) ;
73
+ }
74
+
75
+ [ xunit ::FactAttribute ]
76
+ public async stt ::Task RunReportRequestObjectAsync ( )
77
+ {
78
+ moq ::Mock < BetaAnalyticsData . BetaAnalyticsDataClient > mockGrpcClient = new moq ::Mock < BetaAnalyticsData . BetaAnalyticsDataClient > ( moq ::MockBehavior . Strict ) ;
79
+ RunReportRequest request = new RunReportRequest
80
+ {
81
+ Property = "propertyc9b48d1a" ,
82
+ Dimensions = { new Dimension ( ) , } ,
83
+ Metrics = { new Metric ( ) , } ,
84
+ DateRanges = { new DateRange ( ) , } ,
85
+ DimensionFilter = new FilterExpression ( ) ,
86
+ MetricFilter = new FilterExpression ( ) ,
87
+ Offset = - 4389998161825790342L ,
88
+ Limit = 7494001492025909162L ,
89
+ MetricAggregations =
90
+ {
91
+ MetricAggregation . Minimum ,
92
+ } ,
93
+ OrderBys = { new OrderBy ( ) , } ,
94
+ CurrencyCode = "currency_code7f81e352" ,
95
+ CohortSpec = new CohortSpec ( ) ,
96
+ KeepEmptyRows = true ,
97
+ ReturnPropertyQuota = true ,
98
+ } ;
99
+ RunReportResponse expectedResponse = new RunReportResponse
100
+ {
101
+ DimensionHeaders =
102
+ {
103
+ new DimensionHeader ( ) ,
104
+ } ,
105
+ MetricHeaders = { new MetricHeader ( ) , } ,
106
+ Rows = { new Row ( ) , } ,
107
+ Totals = { new Row ( ) , } ,
108
+ Maximums = { new Row ( ) , } ,
109
+ Minimums = { new Row ( ) , } ,
110
+ RowCount = 743251772 ,
111
+ Metadata = new ResponseMetaData ( ) ,
112
+ PropertyQuota = new PropertyQuota ( ) ,
113
+ } ;
114
+ mockGrpcClient . Setup ( x => x . RunReportAsync ( request , moq ::It . IsAny < grpccore ::CallOptions > ( ) ) ) . Returns ( new grpccore ::AsyncUnaryCall < RunReportResponse > ( stt ::Task . FromResult ( expectedResponse ) , null , null , null , null ) ) ;
115
+ BetaAnalyticsDataClient client = new BetaAnalyticsDataClientImpl ( mockGrpcClient . Object , null ) ;
116
+ RunReportResponse responseCallSettings = await client . RunReportAsync ( request , gaxgrpc ::CallSettings . FromCancellationToken ( st ::CancellationToken . None ) ) ;
117
+ xunit ::Assert . Same ( expectedResponse , responseCallSettings ) ;
118
+ RunReportResponse responseCancellationToken = await client . RunReportAsync ( request , st ::CancellationToken . None ) ;
119
+ xunit ::Assert . Same ( expectedResponse , responseCancellationToken ) ;
120
+ mockGrpcClient . VerifyAll ( ) ;
121
+ }
122
+
29
123
[ xunit ::FactAttribute ]
30
124
public void RunPivotReportRequestObject ( )
31
125
{
@@ -391,7 +485,7 @@ public void RunRealtimeReportRequestObject()
391
485
Metrics = { new Metric ( ) , } ,
392
486
DimensionFilter = new FilterExpression ( ) ,
393
487
MetricFilter = new FilterExpression ( ) ,
394
- PageSize = - 226905851 ,
488
+ Limit = 7494001492025909162L ,
395
489
MetricAggregations =
396
490
{
397
491
MetricAggregation . Minimum ,
@@ -410,7 +504,7 @@ public void RunRealtimeReportRequestObject()
410
504
Totals = { new Row ( ) , } ,
411
505
Maximums = { new Row ( ) , } ,
412
506
Minimums = { new Row ( ) , } ,
413
- TotalSize = 1202968108 ,
507
+ RowCount = 743251772 ,
414
508
PropertyQuota = new PropertyQuota ( ) ,
415
509
} ;
416
510
mockGrpcClient . Setup ( x => x . RunRealtimeReport ( request , moq ::It . IsAny < grpccore ::CallOptions > ( ) ) ) . Returns ( expectedResponse ) ;
@@ -431,7 +525,7 @@ public void RunRealtimeReportRequestObject()
431
525
Metrics = { new Metric ( ) , } ,
432
526
DimensionFilter = new FilterExpression ( ) ,
433
527
MetricFilter = new FilterExpression ( ) ,
434
- PageSize = - 226905851 ,
528
+ Limit = 7494001492025909162L ,
435
529
MetricAggregations =
436
530
{
437
531
MetricAggregation . Minimum ,
@@ -450,7 +544,7 @@ public void RunRealtimeReportRequestObject()
450
544
Totals = { new Row ( ) , } ,
451
545
Maximums = { new Row ( ) , } ,
452
546
Minimums = { new Row ( ) , } ,
453
- TotalSize = 1202968108 ,
547
+ RowCount = 743251772 ,
454
548
PropertyQuota = new PropertyQuota ( ) ,
455
549
} ;
456
550
mockGrpcClient . Setup ( x => x . RunRealtimeReportAsync ( request , moq ::It . IsAny < grpccore ::CallOptions > ( ) ) ) . Returns ( new grpccore ::AsyncUnaryCall < RunRealtimeReportResponse > ( stt ::Task . FromResult ( expectedResponse ) , null , null , null , null ) ) ;
0 commit comments