示例#1
0
        public void When_parameters_empty_GetParametersFromJson_returns_empty_object()
        {
            var options = new AnalyticsOptions();

            var json = options.GetParametersAsJson();

            Assert.Equal("{}", json);
        }
示例#2
0
        public void Can_fetch_JSON_from_PositionalParameters()
        {
            var options = new AnalyticsOptions();

            options.Parameter("thevalue");

            var json = options.GetParametersAsJson();

            Assert.Equal("[\"thevalue\"]", json);
        }
示例#3
0
        public void Can_fetch_JSON_from_NamedParameters()
        {
            var options = new AnalyticsOptions();

            options.Parameter("theykey", "thevalue");

            var json = options.GetParametersAsJson();

            Assert.Equal("{\"theykey\":\"thevalue\"}", json);
        }