예제 #1
0
        public void MissingAttributesAreReplacedWithSaneDefaults()
        {
            var uut = new EventTrigger(
                ddna,
                0,
                "{}".Json());

            Expect(uut.GetEventName(), Is.EqualTo(""));
            Expect(uut.GetResponse(), Is.EqualTo("{}".Json()));
        }
예제 #2
0
        public void AttributesAreExtractedAtConstruction()
        {
            var uut = new EventTrigger(
                ddna,
                0,
                "{\"eventName\":\"name\",\"response\":{\"a\":1}}".Json());

            Expect(uut.GetEventName(), Is.EqualTo("name"));
            Expect(uut.GetResponse(), Is.EqualTo("{\"a\":1}".Json()));
        }