/// <summary> /// Verify the control's template parts. /// </summary> public override void TemplatePartsAreDefined() { IDictionary <string, Type> parts = DefaultTimePickerPopupToTest.GetType().GetTemplateParts(); Assert.AreEqual(1, parts.Count); Assert.AreEqual(typeof(ListBox), parts["ListBox"], "Failed to find expected part ListBox!"); }
/// <summary> /// Verify the control's style typed properties. /// </summary> public override void StyleTypedPropertiesAreDefined() { IDictionary <string, Type> styleTypedProperties = DefaultTimePickerPopupToTest.GetType().GetStyleTypedProperties(); Assert.AreEqual(2, styleTypedProperties.Count, "Incorrect number of StyleType properties"); Assert.AreEqual(typeof(RangeBase), styleTypedProperties["SliderStyle"], "Failed to find expected style type SliderStyle"); Assert.AreEqual(typeof(Button), styleTypedProperties["TimeButtonStyle"], "Failed to find expected style type TimeButtonStyle"); }
/// <summary> /// Verify the control's style typed properties. /// </summary> public override void StyleTypedPropertiesAreDefined() { IDictionary <string, Type> styleTypedProperties = DefaultTimePickerPopupToTest.GetType().GetStyleTypedProperties(); Assert.AreEqual(2, styleTypedProperties.Count, "Incorrect number of StyleType properties"); Assert.AreEqual(typeof(ListBox), styleTypedProperties["ListBoxStyle"], "Failed to find expected style type ListBoxStyle"); Assert.AreEqual(typeof(ListBoxItem), styleTypedProperties["ListBoxItemStyle"], "Failed to find expected style type ListBoxItemStyle"); }
/// <summary> /// Verify the control's template parts. /// </summary> public override void TemplatePartsAreDefined() { IDictionary <string, Type> parts = DefaultTimePickerPopupToTest.GetType().GetTemplateParts(); Assert.AreEqual(8, parts.Count); Assert.AreEqual(typeof(RangeBase), parts["HoursSlider"], "Failed to find expected part HoursSlider!"); Assert.AreEqual(typeof(RangeBase), parts["MinutesSlider"], "Failed to find expected part MinutesSlider!"); Assert.AreEqual(typeof(RangeBase), parts["SecondsSlider"], "Failed to find expected part SecondsSlider!"); Assert.AreEqual(typeof(Panel), parts["HoursPanel"], "Failed to find expected part HoursPanel!"); Assert.AreEqual(typeof(Panel), parts["MinutesPanel"], "Failed to find expected part MinutesPanel!"); Assert.AreEqual(typeof(Panel), parts["SecondsPanel"], "Failed to find expected part SecondsPanel!"); Assert.AreEqual(typeof(ButtonBase), parts["Commit"], "Failed to find expected part Commit!"); Assert.AreEqual(typeof(ButtonBase), parts["Cancel"], "Failed to find expected part Cancel!"); }
/// <summary> /// Verify the control's template visual states. /// </summary> public override void TemplateVisualStatesAreDefined() { IDictionary <string, string> states = DefaultTimePickerPopupToTest.GetType().GetVisualStates(); Assert.AreEqual(12, states.Count, "Incorrect number of template states"); Assert.AreEqual("CommonStates", states["Normal"], "Failed to find expected state Normal!"); Assert.AreEqual("CommonStates", states["MouseOver"], "Failed to find expected state MouseOver!"); Assert.AreEqual("CommonStates", states["Pressed"], "Failed to find expected state Pressed!"); Assert.AreEqual("CommonStates", states["Disabled"], "Failed to find expected state Disabled!"); Assert.AreEqual("FocusStates", states["Focused"], "Failed to find expected state Focused!"); Assert.AreEqual("FocusStates", states["Unfocused"], "Failed to find expected state Unfocused!"); Assert.AreEqual("ContainedByPickerStates", states["Contained"], "Failed to find expected state Contained!"); Assert.AreEqual("ContainedByPickerStates", states["NotContained"], "Failed to find expected state NotContained!"); Assert.AreEqual("PopupModeStates", states["AllowSecondsAndDesignatorsSelection"], "Failed to find expected state AllowSecondsAndDesignatorsSelection!"); Assert.AreEqual("PopupModeStates", states["AllowTimeDesignatorsSelection"], "Failed to find expected state AllowTimeDesignatorsSelection!"); Assert.AreEqual("PopupModeStates", states["AllowSecondsSelection"], "Failed to find expected state AllowSecondsSelection!"); Assert.AreEqual("PopupModeStates", states["HoursAndMinutesOnly"], "Failed to find expected state HoursAndMinutesOnly!"); }