コード例 #1
0
        /// <summary>
        /// Verify the control's template parts.
        /// </summary>
        public override void TemplatePartsAreDefined()
        {
            IDictionary <string, Type> templateParts = DefaultTransitioningContentControlToTest.GetType().GetTemplateParts();

            Assert.AreEqual(2, templateParts.Count);
            Assert.AreSame(typeof(ContentControl), templateParts["PreviousContentPresentationSite"]);
            Assert.AreSame(typeof(ContentControl), templateParts["CurrentContentPresentationSite"]);
        }
コード例 #2
0
        /// <summary>
        /// Verify the control's template visual states.
        /// </summary>
        public override void TemplateVisualStatesAreDefined()
        {
            IDictionary <string, string> visualStates = DefaultTransitioningContentControlToTest.GetType().GetVisualStates();

            Assert.AreEqual(2, visualStates.Count);

            Assert.AreEqual("PresentationStates", visualStates["Normal"]);
            Assert.AreEqual("PresentationStates", visualStates["DefaultTransition"]);
        }