Exemple #1
0
        public void ShoudNotReturnPreviousValue()
        {
            RangeValueProvider provider;

            provider = new RangeValueProvider();
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => provider.GetPreviousValue(char.MinValue));
        }
Exemple #2
0
        public void ShoudReturnPreviousValue()
        {
            RangeValueProvider provider;

            provider = new RangeValueProvider();
            Assert.AreEqual('a', provider.GetPreviousValue('b'));
        }
Exemple #3
0
        public void ShoudReturnNextValue()
        {
            RangeValueProvider provider;

            provider = new RangeValueProvider();
            Assert.AreEqual('b', provider.GetNextValue('a'));
        }
Exemple #4
0
        public void ShoudReturnIsMaxValue()
        {
            RangeValueProvider provider;

            provider = new RangeValueProvider();
            Assert.IsTrue(provider.IsMaxValue(char.MaxValue));
            Assert.IsFalse(provider.IsMaxValue('a'));
        }
Exemple #5
0
        public void ShoudNReturnTerminalRange()
        {
            RangeValueProvider         provider;
            ITerminalRangeInput <char> range;

            provider = new RangeValueProvider();
            range    = provider.CreateTerminalRangeInput('a', 'z');
            Assert.AreEqual('a', range.FirstValue);
            Assert.AreEqual('z', range.LastValue);
        }
 public void SetUp()
 {
     _rangeValue = new RangeValueControlStub(new Control());
     _provider   = new RangeValueProvider(_rangeValue);
 }
 public void SetUp()
 {
     _rangeValue = new RangeValueControlStub(new Control());
     _provider = new RangeValueProvider(_rangeValue);
 }