Esempio n. 1
0
        public void TestElementWithChildren()
        {
            var elem = new Connect();

            elem.Room("name", "participant_identity");

            elem.Autopilot("name");

            elem.Stream(
                "name",
                "connector_name",
                "url",
                Stream.TrackEnum.InboundTrack,
                "status_callback",
                Stream.StatusCallbackMethodEnum.Get
            );

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<Connect>" + Environment.NewLine +
                "  <Room participantIdentity=\"participant_identity\">name</Room>" + Environment.NewLine +
                "  <Autopilot>name</Autopilot>" + Environment.NewLine +
                "  <Stream name=\"name\" connectorName=\"connector_name\" url=\"url\" track=\"inbound_track\" statusCallback=\"status_callback\" statusCallbackMethod=\"GET\"></Stream>" + Environment.NewLine +
                "</Connect>",
                elem.ToString()
            );
        }
Esempio n. 2
0
    static void Main()
    {
        var response = new VoiceResponse();
        var connect  = new Connect();

        connect.Autopilot("UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
        response.Append(connect);

        System.Console.WriteLine(response.ToString());
    }
Esempio n. 3
0
        public void TestElementWithChildren()
        {
            var elem = new Connect();

            elem.Room("name", "participant_identity");

            elem.Autopilot("name");

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<Connect>" + Environment.NewLine +
                "  <Room participantIdentity=\"participant_identity\">name</Room>" + Environment.NewLine +
                "  <Autopilot>name</Autopilot>" + Environment.NewLine +
                "</Connect>",
                elem.ToString()
                );
        }