示例#1
0
        public void ViewAccessibilityAddressCollectionGetAddressAt()
        {
            tlog.Debug(tag, $"ViewAccessibilityAddressCollectionGetAddressAt START");

            using (View view = new ImageView())
            {
                var testingTarget = new AddressCollection(Interop.ControlDevel.DaliToolkitDevelControlNewGetAccessibilityRelations(view.SwigCPtr));
                Assert.IsNotNull(testingTarget, "Can't create success object AddressCollection");
                Assert.IsInstanceOf <AddressCollection>(testingTarget, "Should be an instance of AddressCollection type.");

                try
                {
                    var result = testingTarget.GetAddressAt(AccessibilityRelationType.Details, 19);
                    Assert.IsNotNull(result, "Can't create success object Address");
                    Assert.IsInstanceOf <Address>(result, "Should be an instance of Address type.");
                }
                catch (Exception e)
                {
                    tlog.Debug(tag, e.Message.ToString());
                    Assert.Fail("Caught Exception: Failed!");
                }
            }

            tlog.Debug(tag, $"ViewAccessibilityAddressCollectionGetAddressAt END (OK)");
        }