using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lima;

namespace UnitTesting
{
    public class NumericSliderInputTests : UnitTestSharp.TestFixture
    {
        public class TextChangedEvent : UnitTestSharp.TestFixture
        {
            public void InvokesEventWhenTextChanges()
            {
                var slider = new Lima.NumericSliderInput();
                bool textChangedInvoked = false;
                slider.TextChanged += (_, __) => { textChangedInvoked = true; };
                slider.Text = "foo";
                CheckTrue(textChangedInvoked);
            }
        }

        public class SilentSetText : UnitTestSharp.TestFixture
        {
            public void SuppressesTextChangedEvent()
            {
                var slider = new Lima.NumericSliderInput();
                bool textChangedInvoked = false;
                slider.TextChanged += (_, __) => { textChangedInvoked = true; };
                slider.SilentSetText("foo");
                CheckFalse(textChangedInvoked);
            }
        }
    }
}