public void TestThatExcludeReturnsTrueIfIntegerValueIsNotBetweenValues()
        {
            var       fixture   = new Fixture();
            const int fromValue = 0;
            const int toValue   = 9;

            var fieldMock = MockRepository.GenerateMock <IField>();

            fieldMock.Expect(m => m.NameSource)
            .Return(fixture.CreateAnonymous <string>())
            .Repeat.Any();

            var criteria = new IntervalCriteria <int>(fieldMock, fromValue, toValue);

            Assert.That(criteria, Is.Not.Null);

            Assert.That(criteria.Exclude(10), Is.True);
        }
        public void TestThatExcludeReturnsTrueIfStringValueIsNotBetweenValues()
        {
            var fixture   = new Fixture();
            var value     = fixture.CreateAnonymous <string>();
            var fromValue = string.Format("{0}0", value);
            var toValue   = string.Format("{0}9", value);

            var fieldMock = MockRepository.GenerateMock <IField>();

            fieldMock.Expect(m => m.NameSource)
            .Return(fixture.CreateAnonymous <string>())
            .Repeat.Any();

            var criteria = new IntervalCriteria <string>(fieldMock, fromValue, toValue);

            Assert.That(criteria, Is.Not.Null);

            Assert.That(criteria.Exclude(string.Format("{0}A", value)), Is.True);
        }