示例#1
0
        public void DefaultHangupCommandToJsonTest()
        {
            Hangup hangup = new Hangup();

            string json = hangup.toJson();

            Assert.IsNotNull(json);
            Assert.AreEqual(json, "{\"Hangup\":{}}");
        }
示例#2
0
        public void HangupCommandToJsonTest()
        {
            Hangup hangup = new Hangup();

            hangup.setCallId("12345");
            hangup.setReason("the reason");

            string json = hangup.toJson();

            Assert.IsNotNull(json);
            Assert.AreEqual(json, "{\"Hangup\":{\"callId\":\"12345\",\"reason\":\"the reason\"}}");
        }