Exemple #1
0
        public void AddNonOverridableAttributeWhichIsNotAvailable()
        {
            EventPayloadBuilder builder = new EventPayloadBuilder(new Dictionary <string, JsonValue>(), mockLogger);

            builder.AddNonOverridableAttribute("NonOverridable", JsonStringValue.FromString("Changed"));

            Assert.That(builder.Build(), Is.EqualTo("{\"NonOverridable\":\"Changed\"}"));
        }
Exemple #2
0
        public void AddNonOverridableAttributeWhichIsAlreadyAvailable()
        {
            Dictionary <string, JsonValue> dict = new Dictionary <string, JsonValue>();

            dict.Add("dt.sid", JsonStringValue.FromString("MySession"));

            EventPayloadBuilder builder = new EventPayloadBuilder(dict, mockLogger);

            builder.AddNonOverridableAttribute("dt.sid", JsonStringValue.FromString("ComingFromAgent"));

            Assert.That(builder.Build(), Is.EqualTo("{\"dt.sid\":\"ComingFromAgent\"}"));
        }