File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -108,3 +108,31 @@ func TestRunReport(t *testing.T) {
108
108
assert .Equal (t , propertyQuota .TokensPerProjectPerHour .Consumed * int64 (wantRequestedCount ), resp .PropertyQuota .TokensPerProjectPerHour .Consumed )
109
109
})
110
110
}
111
+
112
+ func TestDimensionIndex (t * testing.T ) {
113
+ targetColumn := DimensionDate
114
+ res := RunReportResponse {
115
+ RunReportResponse : & analyticsdata.RunReportResponse {
116
+ DimensionHeaders : []* analyticsdata.DimensionHeader {
117
+ {
118
+ Name : targetColumn ,
119
+ },
120
+ },
121
+ },
122
+ }
123
+ assert .Equal (t , 0 , res .DimensionIndex (targetColumn ))
124
+ }
125
+
126
+ func TestMetricIndex (t * testing.T ) {
127
+ targetColumn := MetricSessions
128
+ res := RunReportResponse {
129
+ RunReportResponse : & analyticsdata.RunReportResponse {
130
+ MetricHeaders : []* analyticsdata.MetricHeader {
131
+ {
132
+ Name : targetColumn ,
133
+ },
134
+ },
135
+ },
136
+ }
137
+ assert .Equal (t , 0 , res .MetricIndex (targetColumn ))
138
+ }
You can’t perform that action at this time.
0 commit comments