Beispiel #1
0
        public void Can_I_Generate_GetSpeech()
        {
            var response = new Response();
            response.GetSpeech(GetSpeech.Create("http://www.grammar-url.com", "http://www.action-url.com"));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #2
0
        public void Can_I_Generate_Sms()
        {
            var response = new Response();
            response.Sms("Hello from inbound :)", PhoneNumberToDial, PhoneNumberToDial);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #3
0
        public void Can_I_Generate_Sms_With_Attributes()
        {
            var response = new Response();
            response.Sms("Hello from inbound :)", PhoneNumberToDial, PhoneNumberToDial, null, HttpMethod.POST, null);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #4
0
        public void Can_I_Generate_Say()
        {
            var response = new Response();
            response.Say("Hello from InboundXML!");

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #5
0
        public void Can_I_Generate_Dial_With_Number()
        {
            var response = new Response();
            response.Dial(Dial.Create(PhoneNumberToDial).Number("123", "456", null, HttpMethod.POST));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #6
0
        public void Can_I_Generate_Gather()
        {
            var response = new Response();
            response.Gather(Gather.Create("http://www.action-url.com"));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #7
0
        public void Can_I_Generate_Say_With_Attributes()
        {
            var response = new Response();
            response.Say("Hello from women voice", Voice.man, 10);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #8
0
        public void Can_I_Generate_Dial_With_Sip_With_Attributes()
        {
            var response = new Response();
            response.Dial(Dial.Create(PhoneNumberToDial).Sip("sip-address", "123", null, HttpMethod.GET));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #9
0
        public void Can_I_Generate_Reject()
        {
            var response = new Response();
            response.Reject();

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #10
0
        public void Can_I_Generate_Reject_With_Attributes()
        {
            var response = new Response();
            response.Reject(RejectReason.busy);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #11
0
        public void Can_I_Generate_Redirect_With_Attributes()
        {
            var response = new Response();
            response.Redirect("http://www.redirect-url.com", HttpMethod.POST);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #12
0
        public void Can_I_Generate_Conference_With_Dial()
        {
            var response = new Response();
            response.Dial(Dial.Create(PhoneNumberToDial).Conference("conference"));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #13
0
        public void Can_I_Generate_Multiple_Say()
        {
            var response = new Response();
            response.Say("Hello").Say("From").Say("Inbound XML", null, 10);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #14
0
        public void Can_I_Generate_Hangup_With_Attributes()
        {
            var response = new Response();
            response.Hangup(10);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #15
0
        public void Can_I_Generate_Gather_With_Say()
        {
            var response = new Response();
            response.Gather(Gather.Create("http://www.action-url.com").Say("Hello", Voice.man, null));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #16
0
        public void Can_I_Generate_Gather_With_Attributes()
        {
            var response = new Response();
            response.Gather(Gather.Create("http://www.action-url.com", null, 10, "#", 10));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #17
0
        public void Can_I_Generate_Play()
        {
            var response = new Response();
            response.Play("http://www.audio-url.com");

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #18
0
        public void Can_I_Generate_Dial_With_Sip()
        {
            var response = new Response();
            response.Dial(Dial.Create(PhoneNumberToDial).Sip("sip-address"));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #19
0
        public void Can_I_Generate_Redirect()
        {
            var response = new Response();
            response.Redirect("http://www.redirect-url.com");

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #20
0
        public void Can_I_Generate_Conference_With_Attributes_With_Dial()
        {
            var response = new Response();
            response.Dial(Dial.Create(PhoneNumberToDial).Conference("conference", true, true,
                true, false, 10, null, HttpMethod.GET, null, null, null, null, null, null, false));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #21
0
        public void Can_I_Generate_Record_With_Attributes()
        {
            var response = new Response();
            response.Record("http://www.action-url.com", null,
                10, "*", 10, true, 
                null, false, false, null);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #22
0
        public void Can_I_Generate_Dial_With_Attributes()
        {
            var response = new Response();
            response.Dial(Dial.Create(PhoneNumberToDial,
                null, null, 10, null, null, null, false, null, null,
                null, true, null, true, null, null, null));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #23
0
        public void Can_I_Generate_Record_With_Options()
        {
            var response = new Response();
            var options = new RecordOptions();

            options.FileFormat = RecordingFileFormat.wav;
            options.FinishOnKey = "*";
            options.Timeout = 10;

            response.Record(options);

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }
Beispiel #24
0
        public void Can_I_Generate_Dial_With_Options()
        {
            var response = new Response();
            var options = new DialOptions();

            options.Value = PhoneNumberToDial;
            options.Action = "http://www.action-url.com";
            options.HangupOnStar = false;
            options.HideCallerId = true;
            options.Method = HttpMethod.GET;

            response.Dial(Dial.Create(options));

            Assert.True(IsValidInboundXML(response.CreateXml()));
        }