示例#1
0
        ISpecificationExpression <Ticket> GetFromPredicateAndValue(Criterion criterion)
        {
            var predicateAndValue = criterion.Test as PredicateAndValue;
            var sprintName        = valueResolver.Resolve <string>(predicateAndValue.Value);
            var spec = new HasSprint(sprintName);

            if (predicateAndValue.PredicateText == PredicateName.NotEquals)
            {
                return(spec.Not());
            }

            return(spec);
        }
示例#2
0
        ISpecificationExpression <Ticket> GetFromPredicateFunction(Criterion criterion)
        {
            var predicateFunction = criterion?.Test as PredicateFunction;

            if (predicateFunction == null)
            {
                return(null);
            }
            var sprintNames = valueResolver.ResolveAll <string>(predicateFunction.Parameters);
            var spec        = new HasSprint(sprintNames);

            if (predicateFunction.Inverted)
            {
                return(spec.Not());
            }

            return(spec);
        }