ADLTest.CloudeoServiceTest.testRenderingWidget C# (CSharp) Method

testRenderingWidget() private method

private testRenderingWidget ( ) : void
return void
        public void testRenderingWidget()
        {
            // 1. Set proper video capture device
            Dictionary<string, string> devs = null; ;
            _service.getVideoCaptureDeviceNames(createDevsResponder());
            devs = awaitDictResult("getVideoCaptureDeviceNames", 15000);
            Assert.IsTrue(devs.Count > 0);
            Console.Error.WriteLine("Setting the device");
            _service.setVideoCaptureDevice(createVoidResponder(), devs.Keys.First());

            awaitVoidResult("setVideoCaptureDevice", 15000);

            // 2. Do the real test
            Console.Error.WriteLine("Starting local video");
            _service.startLocalVideo(createStringResponder());
            string sinkId = awaitStringResult("startLocalVideo", 15000);
            Assert.That(sinkId.Length > 0);
            Console.Error.WriteLine("Creating renderer");
            RenderOptions ro = new RenderOptions();
            ro.filter = VideoScalingFilter.FAST_BILINEAR;
            ro.mirror = true;
            ro.sinkId = sinkId;
            Console.Error.WriteLine("Starting rendering");
            Form renderingForm = new Form();
            renderingForm.Width = 360;
            renderingForm.Height = 240;

            _service.renderSink(createRendererResponder(), ro);
            RenderingWidget renderer = awaitRendererResult();
            renderer.Width = 320;
            renderer.Height = 240;
            renderer.SetBounds(10, 10, 320, 240);
            renderingForm.Controls.Add(renderer);

            renderingForm.ShowDialog();
            _service.stopLocalVideo(createVoidResponder());
            awaitVoidResult();
        }