Example #1
0
        public void ListView_Custom_cells_should_be_recognized()
        {
            var page = new ImageCellPage();
            var mgr  = new DefaultSurfaceManager();

            mgr.SetInspectorSurface(page);

            var listview = mgr[page.ListView.Id];

            Assert.IsNotNull(listview);

            var cell = listview.UIWidget.Children[0];

            Assert.IsNotNull(cell);
            Assert.AreEqual(typeof(CustomCell).FullName, cell.FullTypeName);
        }
Example #2
0
        public void ListView_ViewCell_children_recognized()
        {
            var page = new ImageCellPage();
            var mgr  = new DefaultSurfaceManager();

            mgr.SetInspectorSurface(page);

            var listview = mgr[page.ListView.Id];

            Assert.IsNotNull(listview);

            var cell = listview.UIWidget.Children[0];

            Assert.IsNotNull(cell);
            Assert.IsTrue(cell.Children.Count > 0, "cell.Children.Count > 0");
            Assert.AreEqual("Xamarin.Forms.StackLayout", cell.Children[0].FullTypeName);
            Assert.IsTrue(cell.Children[0].Children.Count > 0, "cell.Children[0].Children.Count > 0");
        }
Example #3
0
        public void Cannot_delete_cells()
        {
            var page = new ImageCellPage();
            var mgr  = new DefaultSurfaceManager();

            mgr.SetInspectorSurface(page);

            var listview = mgr[page.ListView.Id];

            Assert.IsNotNull(listview);

            var cell = listview.UIWidget.Children[0];

            Assert.IsNotNull(cell);
            Assert.AreEqual(typeof(CustomCell).FullName, cell.FullTypeName);

            foreach (var child in listview.UIWidget.Children)
            {
                Assert.IsFalse(child.CanDelete);
            }
        }