Пример #1
0
        public void PacksContent()
        {
            var contentView = new ContentView();
            var child       = new View();

            contentView.ControlTemplate = new ControlTemplate(typeof(SimpleTemplate));
            contentView.Content         = child;

            Assume.That(((IElementController)contentView).LogicalChildren[0], Is.TypeOf <SimpleTemplate> ());
            Assert.That(contentView.Descendants(), Contains.Item(child));
        }
Пример #2
0
        public void PacksContent()
        {
            var platform = new UnitPlatform();

            var contentView = new ContentView();
            var child       = new View();

            contentView.ControlTemplate = new ControlTemplate(typeof(SimpleTemplate));
            contentView.Content         = child;
            contentView.Platform        = platform;

            Assume.That(contentView.LogicalChildren[0], Is.TypeOf <SimpleTemplate> ());
            Assert.That(contentView.Descendants(), Contains.Item(child));
        }
Пример #3
0
		public void PacksContent ()
		{
			var platform = new UnitPlatform ();

			var contentView = new ContentView ();
			var child = new View ();

			contentView.ControlTemplate = new ControlTemplate (typeof (SimpleTemplate));
			contentView.Content = child;
			contentView.Platform = platform;

			Assume.That (contentView.LogicalChildren[0], Is.TypeOf<SimpleTemplate> ());
			Assert.That (contentView.Descendants (), Contains.Item (child));
		}