public void CannotMapSingleQueryParameterToMultipleProperties()
        {
            var ex = Assert.Throws <InvalidOperationException>(
                () => QueryParameterValueSupplier.ForType(typeof(MapSingleQueryParameterToMultipleProperties)));

            Assert.Contains("declares more than one mapping for the query parameter 'a'.", ex.Message, StringComparison.OrdinalIgnoreCase);
        }
        public void RejectsUnsupportedType()
        {
            var ex = Assert.Throws <NotSupportedException>(
                () => QueryParameterValueSupplier.ForType(typeof(UnsupportedType)));

            Assert.Equal("Querystring values cannot be parsed as type 'System.Object'.", ex.Message);
        }
 public void ComponentWithNoQueryParametersHasNoSupplier()
 {
     Assert.Null(QueryParameterValueSupplier.ForType(typeof(NoQueryParameters)));
 }