diff --git a/run_report_test.go b/run_report_test.go index 0365640..7ab32de 100644 --- a/run_report_test.go +++ b/run_report_test.go @@ -108,3 +108,31 @@ func TestRunReport(t *testing.T) { assert.Equal(t, propertyQuota.TokensPerProjectPerHour.Consumed*int64(wantRequestedCount), resp.PropertyQuota.TokensPerProjectPerHour.Consumed) }) } + +func TestDimensionIndex(t *testing.T) { + targetColumn := DimensionDate + res := RunReportResponse{ + RunReportResponse: &analyticsdata.RunReportResponse{ + DimensionHeaders: []*analyticsdata.DimensionHeader{ + { + Name: targetColumn, + }, + }, + }, + } + assert.Equal(t, 0, res.DimensionIndex(targetColumn)) +} + +func TestMetricIndex(t *testing.T) { + targetColumn := MetricSessions + res := RunReportResponse{ + RunReportResponse: &analyticsdata.RunReportResponse{ + MetricHeaders: []*analyticsdata.MetricHeader{ + { + Name: targetColumn, + }, + }, + }, + } + assert.Equal(t, 0, res.MetricIndex(targetColumn)) +}