Ejemplo n.º 1
0
        public void AddOverridableAttributeWhichIsNotAvailable()
        {
            EventPayloadBuilder builder = new EventPayloadBuilder(new Dictionary <string, JsonValue>(), mockLogger);

            builder.AddOverridableAttribute("Overridable", JsonStringValue.FromString("Changed"));

            Assert.That(builder.Build(), Is.EqualTo("{\"Overridable\":\"Changed\"}"));
        }
Ejemplo n.º 2
0
        public void AddOverridableAttributeWhichIsAlreadyAvailable()
        {
            Dictionary <string, JsonValue> dict = new Dictionary <string, JsonValue>();

            dict.Add("timestamp", JsonStringValue.FromString("Changed"));

            EventPayloadBuilder builder = new EventPayloadBuilder(dict, mockLogger);

            builder.AddOverridableAttribute("timestamp", JsonStringValue.FromString("ComingFromAgent"));

            Assert.That(builder.Build(), Is.EqualTo("{\"timestamp\":\"Changed\",\"dt.overridden_keys\":[\"timestamp\"]}"));
        }