public static ParameterSpecification Combine(this ParameterSpecification left, ParameterSpecification right) { if (left == Any) return right; if (right == Any) return left; if (left == null || right == null) return left ?? right; return x => { var leftOutcome = left(x); return leftOutcome.WasSuccessful ? leftOutcome & right(x) : leftOutcome; }; }
public void Customize(IFixture fixture) { var spec = new ParameterSpecification(paramType, paramName); fixture.Customizations.Add(new FilteringSpecimenBuilder(new CapabilitySpecSpecimenBuilder(), spec)); }
public string GetBackground() { var backgroundColor = (_unitOfWork.Parameters.Find(ParameterSpecification.OfType <BackgroundColor>())).FirstOrDefault(); return(backgroundColor?.Value ?? string.Empty); }