Пример #1
0
        /// <summary>
        /// Verify the control's template parts.
        /// </summary>
        public override void TemplatePartsAreDefined()
        {
            IDictionary <string, Type> parts = DefaultFrameworkElementToTest.GetType().GetTemplateParts();

            Assert.AreEqual(1, parts.Count);
            Assert.AreEqual(typeof(ContentPresenter), parts["ContentSite"], "Failed to find expected part ContentSite!");
        }
        /// <summary>
        /// Verify the control's template parts.
        /// </summary>
        public override void TemplatePartsAreDefined()
        {
            IDictionary <string, Type> parts = DefaultFrameworkElementToTest.GetType().GetTemplateParts();

            Assert.AreEqual(2, parts.Count);
            Assert.AreEqual(typeof(ExpandableContentControl), parts["ExpandSite"], "Failed to find expected part ExpandSite!");
            Assert.AreEqual(typeof(AccordionButton), parts["ExpanderButton"], "Failed to find expected part ExpanderButton!");
        }
 public virtual void StyleTypedPropertiesAreDefined()
 {
     Assert.AreEqual(0, DefaultFrameworkElementToTest.GetType().GetStyleTypedProperties().Count);
 }
 public virtual void TemplateVisualStatesAreDefined()
 {
     Assert.AreEqual(0, DefaultFrameworkElementToTest.GetType().GetVisualStates().Count);
 }
 public override void TemplatePartsAreDefined()
 {
     Assert.AreEqual(1, DefaultFrameworkElementToTest.GetType().GetTemplateParts().Count);
     Assert.AreSame(typeof(Canvas), DefaultFrameworkElementToTest.GetType().GetTemplateParts()["PlotArea"]);
 }