2using System.Collections.Generic;
12using Microsoft.VisualStudio.TestTools.UnitTesting;
16using TestCategory =
NUnit.Framework.CategoryAttribute;
40 #region LossFilter Derived Types
44 #region Set Up and Configuration
45 private const string TypeName =
"AndFilter";
48 #endregion Set Up and Configuration
54 #region Set Up and Configuration
55 private const string TypeName =
"AnyFilter";
58 #endregion Set Up and Configuration
64 #region Set Up and Configuration
65 private const string TypeName =
"AnyOfFilter";
68 #endregion Set Up and Configuration
87 [
TestMethod, TestCategory(TypeName), TestCategory(
"Skipped")]
91 "Possible to POST and PUT AnyOfFilter with Mixed types.");
101 #region Set Up and Configuration
102 private const string TypeName =
"RecordTypeAnyOfFilter";
105 #endregion Set Up and Configuration
132 #region Set Up and Configuration
133 private const string TypeName =
"GTFilter";
136 #endregion Set Up and Configuration
142 #region Set Up and Configuration
143 private const string TypeName =
"LTFilter";
146 #endregion Set Up and Configuration
152 #region Set Up and Configuration
153 private const string TypeName =
"OrFilter";
156 #endregion Set Up and Configuration
162 #region Set Up and Configuration
163 private const string TypeName =
"RangeFilter";
166 #endregion Set Up and Configuration
201 #endregion begin_value
203 #region begin_inclusive
205 #endregion begin_inclusive
242 #region end_inclusive
244 #endregion end_inclusive
247 #endregion LossFilter Derived Types
249 #region Abstract Base LossFilter Tests
254 private const string TypeName =
"ExpressionFilter";
279 #endregion expressions
288 private const string TypeName =
"ComparisonFilter";
335 private const string TypeName =
"AttributeFilter";
357 private const string TypeName =
"LossFilter";
385 #endregion Abstract Base LossFilter Tests
Tests for a stored resource collection which do not require an instance of that resource to be define...
void POST_StringAttribute_Empty(Expression< Func< T, string > > PropertyExpression, bool? shouldSucceed=null)
Post a resource with the specified string set to an empty string.
Exposes sample resource objects, with built-in methods for injecting dependencies.
IInjectableResource< RangeFilter > LossFilter_RangeFilter
IInjectableResource< OrFilter > LossFilter_OrFilter
IInjectableResource< AndFilter > LossFilter_AndFilter
IInjectableResource< Filter > Layer_Filter
IInjectableResource< LTFilter > LossFilter_LTFilter
IInjectableResource< AnyFilter > LossFilter_AnyFilter
IInjectableResource< GTFilter > LossFilter_GTFilter
IInjectableResource< RecordTypeAnyOfFilter > LossFilter_RecordTypeAnyOfFilter
IInjectableResource< AnyOfFilter > LossFilter_AnyOfFilter
Contains static helper methods for testing IAPIResourceView instances.
override IInjectableResource< AndFilter > TestInjectableResource
override IInjectableResource< AnyFilter > TestInjectableResource
void Test_AnyOfFilter_POST_Values_MixedTypes()
void Test_AnyOfFilter_POST_Values_Null()
void Test_AnyOfFilter_POST_Values_Duplicates()
override IInjectableResource< AnyOfFilter > TestInjectableResource
void Test_AnyOfFilter_POST_Values_Empty()
Includes tests that affect all types of AttributeFilter.
virtual void Test_AttributeFilter_POST_Attribute_Null()
virtual void Test_AttributeFilter_POST_Attribute_Blank()
override IResourceCollection< LossFilter > collection_source
override bool PUT_Allowed
static void TestFilterInLayerView< T >(T filter)
Reference the specified filter in a new LayerView{Filter}, and test whether the LayerView POST and si...
Includes tests that affect all types of ComparisonFilter.
virtual void Test_ComparisonFilter_POST_Value_Infinity()
virtual void Test_ComparisonFilter_POST_Value_MinValue()
virtual void Test_ComparisonFilter_POST_Value_HighPrecision()
virtual void Test_ComparisonFilter_POST_Value_NaN()
virtual void Test_ComparisonFilter_POST_Value_MaxValue()
virtual void Test_ComparisonFilter_POST_Value_NegativeInfinity()
Includes tests that affect all types of ExpressionFilter.
virtual void Test_ExpressionFilter_POST_Expressions_Invalid()
virtual void Test_ExpressionFilter_POST_Expressions_Empty()
virtual void Test_ExpressionFilter_POST_Expressions_Null()
virtual void Test_ExpressionFilter_POST_Expressions_Duplicates()
override IInjectableResource< GTFilter > TestInjectableResource
override IInjectableResource< LTFilter > TestInjectableResource
override IInjectableResource< OrFilter > TestInjectableResource
void Test_RangeFilter_POST_BeginValue_MinValue()
void Test_RangeFilter_POST_BeginValue_Infinity()
override IInjectableResource< RangeFilter > TestInjectableResource
void Test_RangeFilter_POST_BeginValue_MaxValue()
void Test_RangeFilter_POST_EndValue_MaxValue()
void Test_RangeFilter_POST_EndValue_HighPrecision()
void Test_RangeFilter_POST_EndValue_NaN()
void Test_RangeFilter_POST_BeginValue_HighPrecision()
void Test_RangeFilter_POST_EndValue_MinValue()
void Test_RangeFilter_POST_EndValue_Infinity()
void Test_RangeFilter_POST_BeginValue_NaN()
void Test_RangeFilter_POST_EndValue_NegativeInfinity()
void Test_RangeFilter_POST_BeginValue_NegativeInfinity()
override IInjectableResource< RecordTypeAnyOfFilter > TestInjectableResource
void Test_RecordTypeAnyOfFilter_POST_Values_Null()
void Test_RecordTypeAnyOfFilter_POST_Values_Duplicates()
void Test_RecordTypeAnyOfFilter_POST_Values_Empty()
Includes tests that affect all types of LossFilter.
virtual void Test_LossFilter_POST_Name_Null()
virtual void Test_LossFilter_POST_Name_Blank()
override void AdditionalValidResourceTests(T posted)
For all tests, we want to test success both when the layer is posted on its own, and when it's posted...
Generic Unit test implementations that will test REST methods on arbitrary resources.
A helper class containing default skip dates.
static void Validation(string ticket=null)
Skip a test due to a validation-related issue, possibly with no insight into when this issue is likel...
Class used in unit tests to mark tests as skipped by using Assert.Inconclusive() method.
Describes a collection of resources which can be listed.
API methods / requests made available to the user.
static readonly ResourceCollection< LossFilter > LossFilters
The collection of LossFilters on the server.
A predicate that determines whether a loss should be included in the perspective or not.
A filter that does a test on some attribute.
A filter where the specified attribute's value is compared to some predetermined value.
A filter that operates on a list of filters.
IReference< T > AsReference
A reference to the posted resource.
T Unposted
The unPOSTed resource definition.
RecordType
The type of occurrence.