Example #1
0
        public void RadioButtonGroupGetItem()
        {
            tlog.Debug(tag, $"RadioButtonGroupGetItem START");

            var testingTarget = new RadioButtonGroup();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <RadioButtonGroup>(testingTarget, "Should return RadioButtonGroup instance.");

            RadioButton button = new RadioButton();

            testingTarget.Add(button);
            var result = testingTarget.GetItem(0);

            tlog.Debug(tag, "GetItem : " + result);

            button.IsSelected = true;
            tlog.Debug(tag, "GetSelectedItem : " + testingTarget.GetSelectedItem());

            try
            {
                testingTarget.Remove(button);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            button.Dispose();
            tlog.Debug(tag, $"RadioButtonGroupGetItem END (OK)");
        }