Пример #1
0
        /// <summary>
        /// Creates a new instance of the <see cref="AbstractAssertions" /> class
        /// with the parameter expression, filter attribute and the filters.
        /// </summary>
        /// <param name="parameterName">The parameter name.</param>
        /// <param name="filterAttribute">The filter attribute.</param>
        /// <param name="filters">The filters.</param>
        internal AbstractAssertions(string parameterName, FilterAttribute filterAttribute, List <FilterItem> filters)
        {
            if (parameterName == null)
            {
                throw new ArgumentNullException(nameof(parameterName));
            }

            if (filterAttribute == null)
            {
                throw new ArgumentNullException(nameof(filterAttribute));
            }

            if (string.IsNullOrWhiteSpace(parameterName))
            {
                throw new ApiException(400, "Parameter name should not be empty.");
            }

            ParameterName   = parameterName;
            ParameterFilter = filterAttribute;
            Filters         = filters;
        }
Пример #2
0
 /// <summary>
 /// Creates a new instance of the <see cref="MetaEntityAssertions" /> class
 /// with the parameter expression, filter attribute and the filters.
 /// </summary>
 /// <param name="parameterName">The parameter name.</param>
 /// <param name="filterAttribute">The filter attribute.</param>
 /// <param name="filters">The filters.</param>
 internal MetaEntityAssertions(string parameterName, FilterAttribute filterAttribute, List <FilterItem> filters)
     : base(parameterName, filterAttribute, filters)
 {
 }
Пример #3
0
 /// <summary>
 /// Creates a new instance of the <see cref="CustomAssertions" /> class
 /// with the parameter expression, filter attribute and the filters.
 /// </summary>
 /// <param name="parameterName">The parameter name.</param>
 /// <param name="filterAttribute">The filter attribute.</param>
 /// <param name="filters">The filters.</param>
 internal CustomAssertions(string parameterName, FilterAttribute filterAttribute, List <FilterItem> filters)
     : base(parameterName, filterAttribute, filters)
 {
 }