public virtual void FractionalIncrementsWorkWithDecimalPlaces()
        {
            OverriddenNumericUpDown nud = new OverriddenNumericUpDown
            {
                Value         = 0,
                Increment     = 0.25,
                DecimalPlaces = 0
            };
            TextBox part = null;

            TestAsync(
                10,
                nud,
                () => part = nud.GetVisualDescendents().OfType <TextBox>().FirstOrDefault(),
                () => Assert.IsNotNull("Failed to find TextBox template part!"),
                () => nud.DoIncrement(),
                () => Assert.AreEqual(0.ToString(CultureInfo.CurrentCulture), part.Text, "Fractional value should not be displayed!"),
                () => Assert.AreEqual(.25, nud.Value, "Failed to increment once!"),
                () => nud.DoIncrement(),
                () => nud.DoIncrement(),
                () => nud.DoIncrement(),
                () => Assert.AreEqual(1.ToString(CultureInfo.CurrentCulture), part.Text, "Incorrect final display!"),
                () => Assert.AreEqual(1, nud.Value, "Failed to increment twice!"));
        }
        public virtual void FractionalIncrementsWorkWithDecimalPlaces()
        {
            OverriddenNumericUpDown nud = new OverriddenNumericUpDown
            {
                Value = 0,
                Increment = 0.25,
                DecimalPlaces = 0
            };
            TextBox part = null;

            TestAsync(
                10,
                nud,
                () => part = nud.GetVisualDescendents().OfType<TextBox>().FirstOrDefault(),
                () => Assert.IsNotNull("Failed to find TextBox template part!"),
                () => nud.DoIncrement(),
                () => Assert.AreEqual(0.ToString(CultureInfo.CurrentCulture), part.Text, "Fractional value should not be displayed!"),
                () => Assert.AreEqual(.25, nud.Value, "Failed to increment once!"),
                () => nud.DoIncrement(),
                () => nud.DoIncrement(),
                () => nud.DoIncrement(),
                () => Assert.AreEqual(1.ToString(CultureInfo.CurrentCulture), part.Text, "Incorrect final display!"),
                () => Assert.AreEqual(1, nud.Value, "Failed to increment twice!"));
        }