Exemple #1
0
 public void AllowedQueryOptions_Property_RoundTrips()
 {
     ReflectionAssert.EnumProperty <ODataValidationSettings, AllowedQueryOptions>(
         new ODataValidationSettings(),
         o => o.AllowedQueryOptions,
         expectedDefaultValue: AllowedQueryOptions.Supported,
         illegalValue: AllowedQueryOptions.All + 1,
         roundTripTestValue: AllowedQueryOptions.Filter);
 }
Exemple #2
0
 public void AllowedLogicalOperators_Property_RoundTrips()
 {
     ReflectionAssert.EnumProperty <ODataValidationSettings, AllowedLogicalOperators>(
         new ODataValidationSettings(),
         o => o.AllowedLogicalOperators,
         expectedDefaultValue: AllowedLogicalOperators.All,
         illegalValue: AllowedLogicalOperators.All + 1,
         roundTripTestValue: AllowedLogicalOperators.GreaterThanOrEqual | AllowedLogicalOperators.LessThanOrEqual);
 }
Exemple #3
0
 public void AllowedFunctions_Property_RoundTrips()
 {
     ReflectionAssert.EnumProperty <ODataValidationSettings, AllowedFunctions>(
         new ODataValidationSettings(),
         o => o.AllowedFunctions,
         expectedDefaultValue: AllowedFunctions.AllFunctions,
         illegalValue: AllowedFunctions.AllFunctions + 1,
         roundTripTestValue: AllowedFunctions.AllMathFunctions);
 }
Exemple #4
0
 public void AllowedArithmeticOperators_Property_RoundTrips()
 {
     ReflectionAssert.EnumProperty <ODataValidationSettings, AllowedArithmeticOperators>(
         new ODataValidationSettings(),
         o => o.AllowedArithmeticOperators,
         expectedDefaultValue: AllowedArithmeticOperators.All,
         illegalValue: AllowedArithmeticOperators.All + 1,
         roundTripTestValue: AllowedArithmeticOperators.Multiply);
 }
Exemple #5
0
 public void HandleNullPropagation_Property_RoundTrips()
 {
     ReflectionAssert.EnumProperty <ODataQuerySettings, HandleNullPropagationOption>(
         new ODataQuerySettings(),
         o => o.HandleNullPropagation,
         HandleNullPropagationOption.Default,
         HandleNullPropagationOption.Default - 1,
         HandleNullPropagationOption.True);
 }