public void MeasurementAnalyticsClient_SetCustomDimension_By_Enum_Is_Sent()
        {
            var actual = new List<Uri>();
            var client = new MeasurementAnalyticsClient();
            MeasurementTestHelpers.ConfigureForTest(client, actual.Add);

            client.SetCustomDimension(CustomDimensions.Eight, "DimensionEight");
            client.TrackScreenView("Test View");

            Assert.AreEqual(1, actual.Count);
            StringAssert.Contains(actual[0].Query, "cd8=DimensionEight");
        }
        public void MeasurementAnalyticsClient_SetCustomMetric_Int_Is_Sent()
        {
            var actual = new List<Uri>();
            var client = new MeasurementAnalyticsClient();
            MeasurementTestHelpers.ConfigureForTest(client, actual.Add);

            client.SetCustomMetric(6, 6060);
            client.TrackScreenView("Test View");

            Assert.AreEqual(1, actual.Count);
            StringAssert.Contains(actual[0].Query, "cm6=6060");
        }
        public void MeasurementAnalyticsClient_SetCustomMetric_Timespan_Is_Sent()
        {
            var actual = new List<Uri>();
            var actualTimespan = new TimeSpan(4, 1, 2, 3);
            var client = new MeasurementAnalyticsClient();
            MeasurementTestHelpers.ConfigureForTest(client, actual.Add);

            client.SetCustomMetric(7, actualTimespan);
            client.TrackScreenView("Test View");

            Assert.AreEqual(1, actual.Count);
            StringAssert.Contains(actual[0].Query, "cm7=" + (int)actualTimespan.TotalSeconds);
        }
        public void TrackScreenView_Tracks_ScreenView()
        {
            var list = new List<Uri>();
            var client = new MeasurementAnalyticsClient();
            MeasurementTestHelpers.ConfigureForTest(client, list.Add);

            client.TrackScreenView("SomeScreenName");

            Assert.AreEqual(1, list.Count);
            StringAssert.Contains(list[0].OriginalString, "t=screenview");
        }