예제 #1
0
        public void MakeOutboundCallFromJsonTest()
        {
            string json = "{\"to\":\"+18475978014\",\"from\":\"+12248806205\",\"callConnectUrl\":\"http://foo.com/Persephony/RecordingCallAnswered\",\"timeout\":27,\"ifMachine\":\"continue\"}";

            OutboundCall call = OutboundCall.fromJson(json);

            Assert.IsNotNull(call);
            Assert.AreEqual(call.getFrom, "+12248806205");
            Assert.AreEqual(call.getTo, "+18475978014");
            Assert.AreEqual(call.getCallConnectUrl, "http://foo.com/Persephony/RecordingCallAnswered");
            Assert.AreEqual(call.getTimeout, (uint)27);
            Assert.AreEqual(call.getIfMachine, EIfMachine.Continue);
        }
예제 #2
0
        public void MakeOutboundCallFromJsonDefaultTest()
        {
            string json = "{\"to\":\"+18475978014\",\"from\":\"+12248806205\",\"callConnectUrl\":\"http://foo.com/FreeClimb/RecordingCallAnswered\",\"timeout\":27}";

            OutboundCall call = OutboundCall.fromJson(json);

            Assert.IsNotNull(call);
            Assert.AreEqual(call.getFrom, "+12248806205");
            Assert.AreEqual(call.getTo, "+18475978014");
            Assert.AreEqual(call.getCallConnectUrl, "http://foo.com/FreeClimb/RecordingCallAnswered");
            Assert.AreEqual(call.getTimeout, (uint)27);
            Assert.AreEqual(call.getIfMachine, EIfMachine.NONE);
        }