Exemplo n.º 1
0
        private IRouteValue Generate(IComparable comparable, Column column, string @operator)
        {
            string columnName = column.Name;
            string tableName  = column.TableName;

            switch (@operator)
            {
            case EQUAL:
                return(new ListRouteValue(columnName, tableName, new List <IComparable>()
                {
                    comparable
                }));

            case GREATER_THAN:
                return(new RangeRouteValue(columnName, tableName, Range.GreaterThan(comparable)));

            case LESS_THAN:
                return(new RangeRouteValue(columnName, tableName, Range.LessThan(comparable)));

            case AT_MOST:
                return(new RangeRouteValue(columnName, tableName, Range.AtMost(comparable)));

            case AT_LEAST:
                return(new RangeRouteValue(columnName, tableName, Range.AtLeast(comparable)));

            default:
                return(null);
            }
        }
Exemplo n.º 2
0
        public void ToStringHandlesAtLeastRange()
        {
            var range = Range <int> .AtLeast(5);

            var expected = "[5..+∞)";
            var actual   = range.ToString();

            Assert.Equal(expected, actual);
        }
Exemplo n.º 3
0
 public TwoTeamTrueSkillCalculator()
     : base(SupportedOptions.None, Range <TeamsRange> .Exactly(2), Range <PlayersRange> .AtLeast(1))
 {
 }