public virtual void ShouldBeAbleToGetValueThroughAutomationPeer()
        {
            TimePicker item = new TimePicker();

            item.Culture = new CultureInfo("nl-NL");
            item.Format  = new CustomTimeFormat("HH:mm:ss");
            item.Value   = new DateTime(1900, 1, 1, 3, 45, 12);
            TimePickerAutomationPeer peer     = null;
            IValueProvider           provider = null;

            TestAsync(
                item,
                () => peer     = (TimePickerAutomationPeer)FrameworkElementAutomationPeer.CreatePeerForElement(item),
                () => provider = (IValueProvider)peer.GetPattern(PatternInterface.Value),
                () => Assert.AreEqual(provider.Value, "03:45:12"));
        }
        public virtual void ShouldCorrelateReadOnlyToIsEnabledInAutomationPeer()
        {
            TimePicker item = new TimePicker();

            item.Value = new DateTime(1900, 1, 1, 3, 45, 12);
            TimePickerAutomationPeer peer     = null;
            IValueProvider           provider = null;

            TestAsync(
                item,
                () => peer     = (TimePickerAutomationPeer)FrameworkElementAutomationPeer.CreatePeerForElement(item),
                () => provider = (IValueProvider)peer.GetPattern(PatternInterface.Value),
                () => Assert.IsFalse(provider.IsReadOnly),
                () => item.IsEnabled = false,
                () => Assert.IsTrue(provider.IsReadOnly));
        }