C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeReTesting.Tests.Model.TestSuite_LossFilter_AttributeFilter< T > Class Template Referenceabstract

Includes tests that affect all types of AttributeFilter. More...

Public Member Functions

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 as part of an inlined layer_view definition. To do this, we do additional validation on each posted filter that also tries adding it to a layer_view and simulating it.
 
void BaseTest_Cleanup ()
 
void BaseTest_Initialize ()
 
void POST_Attribute_Null< TProperty > (Expression< Func< T, TProperty > > PropertyExpression, bool? shouldSucceed=null)
 Post a resource with the specified property set to null.
 
void POST_ListAttribute_Duplicates< TItem, TValue > (Expression< Func< T, ICollection< TItem > > > PropertyExpression, TValue valueToDuplicate, bool shouldSucceed)
 
void POST_ListAttribute_Empty< TItem > (Expression< Func< T, ICollection< TItem > > > PropertyExpression, bool? shouldSucceed=null)
 
void POST_Reference_EmptyStringId< TRefType > (Expression< Func< T, IReference< TRefType > > > PropertyExpression)
 Posts a reference with a empty string Id and verifies the correct error is returned.
 
void POST_Reference_NonExistantId< TRefType > (Expression< Func< T, IReference< TRefType > > > PropertyExpression)
 Posts a reference with a non-existent Id and verifies the correct error is returned.
 
void POST_Reference_NullId< TRefType > (Expression< Func< T, IReference< TRefType > > > PropertyExpression)
 Posts a reference with a null Id and verifies the correct error is returned.
 
void POST_ReferenceList_NonExistantId< TRefType > (Expression< Func< T, ICollection< IReference< TRefType > > > > PropertyExpression)
 Posts a reference list with a non-existent Id and verifies the correct error is returned.
 
void POST_StringAttribute_Empty (Expression< Func< T, string > > PropertyExpression, bool? shouldSucceed=null)
 Post a resource with the specified string set to an empty string.
 
virtual void POST_ThenDoAction (T validToPost, Action< T > toExecute)
 Post a valid resource under the assumption that it will succeed, then perform an action on the resulting posted object, then clean up.
 
virtual void POST_WithValue< TProperty > (Expression< Func< T, TProperty > > PropertyExpression, TProperty newValue, bool shouldSucceed)
 Modify a property of the test resource, and then test it.
 
virtual void Test_AttributeFilter_POST_Attribute_Blank ()
 
virtual void Test_AttributeFilter_POST_Attribute_Null ()
 
virtual void Test_LossFilter_POST_Name_Blank ()
 
virtual void Test_LossFilter_POST_Name_Null ()
 
virtual void Test_Reflection_ChangePropertyValueRandomly ()
 Test reflection utilities meant to randomly change property values in a way that would pass server validation.
 
virtual void Test_Resource_DeepCopy ()
 Test that any resource can be "Deep Copied", a slower copy method that creates a new duplicate instance of a resource type by serializing it and then deserializing the resulting JSON to a new resource.
 
virtual void Test_Resource_DELETE ()
 
virtual void Test_Resource_DELETE_NonExistant ()
 
virtual void Test_Resource_GET_AllPropertiesRecognized ()
 
virtual void Test_Resource_GET_Existing ()
 
virtual void Test_Resource_GET_Existing_ResolveReferences ()
 IStoredAPIResource collections support reference resolution.
 
virtual void Test_Resource_GET_FromBatch ()
 Test that resources of this type can be retrieved using the collection batch-get feature.
 
virtual void Test_Resource_GetCollectionName ()
 Verify that all runtime types expose their collection name.
 
virtual void Test_Resource_OfflineRandomGeneration ()
 Test reflection utilities meant to randomly change property values (used for testing comprarer coverage).
 
virtual void Test_Resource_OnlineRandomGeneration ()
 Test reflection utilities meant to randomly change property values in a way that would pass server validation.
 
virtual void Test_Resource_POST_CreatedAndModified ()
 
virtual void Test_Resource_POST_Description_Blank ()
 
virtual void Test_Resource_POST_Description_Null ()
 
virtual void Test_Resource_POST_ExistingId ()
 Verifies that it is okay to post an object with an ID that already exists on the server, even if the object is identical to the one already on the server. This is tested by posting a valid resource, and then rePOSTing the returned resource again (including the id property).
 
virtual void Test_Resource_POST_FieldsIdOnly ()
 Test that a user can post a resource and get back only the id using the omit query parameter.
 
virtual void Test_Resource_POST_Id_Ignored ()
 No matter what string we set the Id property to, POST should succeed because the Id of the posted resource should be ignored by the server.
 
virtual void Test_Resource_POST_Metadata_Empty ()
 
virtual void Test_Resource_POST_Metadata_InvalidValues ()
 
virtual void Test_Resource_POST_MetaData_MixedTypes ()
 
virtual void Test_Resource_POST_Metadata_Null ()
 
virtual void Test_Resource_POST_Valid ()
 
virtual void Test_Resource_PUT_NotAllowed ()
 
virtual void Test_Resource_Search ()
 All resources should support searching in a few fundamental ways.
 
virtual void Test_Resource_ShallowCopy ()
 Test that any resource can be "Shallow Copied", which is a quick copy that does a member-wise clone of the object, including private members.
 
virtual void Test_Resource_TypeReflectionUtilities ()
 Test reflection utilities meant to get extract information about runtime types.
 

Static Public Member Functions

static void ApplyConfiguredCredentials ()
 Apply the current configured API_URL and API_AuthenticationToken credentials to the static API.
 
static void CheckConnection ()
 Set the Client API Server URL to the configured API_URL.
 
static ICollection< TCollectionItemNewCollection< TTarget, TCollectionItem > (Expression< Func< TTarget, ICollection< TCollectionItem > > > propertyExpression, IEnumerable< TCollectionItem > initialItems=null)
 Helper method to create a new collection instance based on the type of the referenced property expression.
 
static void TestSuiteCleanup ()
 Actions to run once when the C# Unit Tests finish. Note: This method will not automatically be inherited and run by tests suites in different assemblies that import this library. You will need to create your own method with the [AssemblyCleanup] attribute that calls this method.
 
static void TestSuiteInitialize (TestContext context)
 Actions to run once when the C# Unit Tests initialize. Note: This method will not automatically be inherited and run by tests suites in different assemblies that import this library. You will need to create your own method with the [AssemblyInitialize] attribute that calls this method.
 

Static Public Attributes

static Reflection Reflection
 Shared instance of a class for generating random resources.
 
static Samples Samples
 Shared instance of a class for generating reusable sample resources.
 

Protected Member Functions

void AddCommonTestCleanupAction (Action action)
 
void AddCommonTestInitializeAction (Action action)
 
void TestResourceDeleteHelper (T toDelete, bool isDeleteAllowed)
 

Static Protected Member Functions

static void BaseClass_Cleanup (Action action)
 
static void BaseClass_Initialize (TestContext context, Action action)
 
static void TestCopyHelper< TCopy > (TCopy original, Func< TCopy, TCopy > copyAction)
 

Properties

static IAccessToken API_AuthenticationToken [get, set]
 Set the AuthenticationToken to supply to the server before every test (if applicable).
 
static string API_URL [get, set]
 Location of the REST API being tested against. This can be set using the API_URL environment variable. Default is https://localhost:8000/.
 
virtual bool DELETE_Allowed [get]
 
bool DeletingResourcesBetweenTests [get]
 Determines based on the EnvironmentSettings whether injected resources (such as Samples) are being deleted between each test.
 
TestContext TestContext [get, set]
 
IInjectableResource< TTestInjectableResource [get]
 Deriving class must override the TestResourceFactory to return a disposable POSTable test resource that unit tests can consume.
 
virtual T TestResource [get]
 The resource used for all unit tests that require a valid prepared but unPOSTed resource.
 
virtual T TestResource_Existing [get]
 The resource used for all unit tests that require a prepared and already posted resource. Warning, there is no protection against the user invoking "PUT" on this resource and changing the state of the resource on the API for everyone. Users that require a resource that it can make modifications to and test saving those modifications must not use this resource. It's here for speed to avoid having to re-POST the same resource multiple times for read-only purposes.
 
bool TryPost_RandomTestResources = true [get, set]
 Allows deriving classes to disable attempting to POST and validate random resources generated by the Test_Resource_OnlineRandomGeneration base tests method - since some randomly generated resources can wreak havoc on the server. When we have some time to "disaster-proof" the server, we should turn these on and solve the problems encountered.
 
bool TryRunAdditionalValidResourceTests_RandomTestResources = true [get, set]
 Similar to TryPost_RandomTestResources - but controls whether these resources have the AdditionalValidResourceTests method run on them.
 

Detailed Description

Includes tests that affect all types of AttributeFilter.

Type Constraints
T :AttributeFilter 

Definition at line 332 of file Test_LossFilter.cs.

Inheritance diagram for AnalyzeReTesting.Tests.Model.TestSuite_LossFilter_AttributeFilter< T >:
AnalyzeReTesting.Tests.Model.TestSuite_LossFilter< T > AnalyzeReTesting.Base.BaseImmutableResourceTestSuite< T > AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T > AnalyzeReTesting.Base.BaseResourceTestSuite< T > AnalyzeReTesting.Base.BaseServerTestSuite AnalyzeReTesting.Base.BaseClientTestSuite AnalyzeReTesting.Base.BaseTestSuite AnalyzeReTesting.Tests.Model.TestSuite_LossFilter_ComparisonFilter< T >

Member Function Documentation

◆ AddCommonTestCleanupAction()

void AnalyzeReTesting.Base.BaseTestSuite.AddCommonTestCleanupAction ( Action  action)
inlineprotectedinherited

Definition at line 80 of file BaseTestSuite.cs.

◆ AddCommonTestInitializeAction()

void AnalyzeReTesting.Base.BaseTestSuite.AddCommonTestInitializeAction ( Action  action)
inlineprotectedinherited

Definition at line 75 of file BaseTestSuite.cs.

◆ AdditionalValidResourceTests()

override void AnalyzeReTesting.Tests.Model.TestSuite_LossFilter< T >.AdditionalValidResourceTests ( T  posted)
virtualinherited

For all tests, we want to test success both when the layer is posted on its own, and when it's posted as part of an inlined layer_view definition. To do this, we do additional validation on each posted filter that also tries adding it to a layer_view and simulating it.

Reimplemented from AnalyzeReTesting.Base.BaseResourceTestSuite< T >.

◆ ApplyConfiguredCredentials()

static void AnalyzeReTesting.Base.BaseServerTestSuite.ApplyConfiguredCredentials ( )
inlinestaticinherited

Apply the current configured API_URL and API_AuthenticationToken credentials to the static API.

Definition at line 226 of file BaseServerAPITestSuite.cs.

◆ BaseClass_Cleanup()

static void AnalyzeReTesting.Base.BaseTestSuite.BaseClass_Cleanup ( Action  action)
inlinestaticprotectedinherited

Definition at line 66 of file BaseTestSuite.cs.

◆ BaseClass_Initialize()

static void AnalyzeReTesting.Base.BaseTestSuite.BaseClass_Initialize ( TestContext  context,
Action  action 
)
inlinestaticprotectedinherited

Definition at line 56 of file BaseTestSuite.cs.

◆ BaseTest_Cleanup()

void AnalyzeReTesting.Base.BaseTestSuite.BaseTest_Cleanup ( )
inlineinherited

Definition at line 46 of file BaseTestSuite.cs.

◆ BaseTest_Initialize()

void AnalyzeReTesting.Base.BaseTestSuite.BaseTest_Initialize ( )
inlineinherited

Definition at line 35 of file BaseTestSuite.cs.

◆ CheckConnection()

static void AnalyzeReTesting.Base.BaseServerTestSuite.CheckConnection ( )
inlinestaticinherited

Set the Client API Server URL to the configured API_URL.

Definition at line 235 of file BaseServerAPITestSuite.cs.

◆ NewCollection< TTarget, TCollectionItem >()

Helper method to create a new collection instance based on the type of the referenced property expression.

Definition at line 221 of file BaseResourceTestSuite.cs.

◆ POST_Attribute_Null< TProperty >()

void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.POST_Attribute_Null< TProperty > ( Expression< Func< T, TProperty > >  PropertyExpression,
bool shouldSucceed = null 
)
inlineinherited

Post a resource with the specified property set to null.

Template Parameters
TPropertyThe type of the property being modified.
Parameters
PropertyExpressionAn expression indicating the TResource property to modify.
shouldSucceed(Optional) Whether the action should succeed. Will be automatically determined from the property attributes if not supplied.
Exceptions
ArgumentExceptionCan only be used on properties whose default type is null.

Definition at line 195 of file BaseResourceTestSuite.cs.

◆ POST_ListAttribute_Duplicates< TItem, TValue >()

void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.POST_ListAttribute_Duplicates< TItem, TValue > ( Expression< Func< T, ICollection< TItem > > >  PropertyExpression,
TValue  valueToDuplicate,
bool  shouldSucceed 
)
inlineinherited
Type Constraints
TValue :TItem 

Definition at line 247 of file BaseResourceTestSuite.cs.

◆ POST_ListAttribute_Empty< TItem >()

void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.POST_ListAttribute_Empty< TItem > ( Expression< Func< T, ICollection< TItem > > >  PropertyExpression,
bool shouldSucceed = null 
)
inlineinherited

Definition at line 237 of file BaseResourceTestSuite.cs.

◆ POST_Reference_EmptyStringId< TRefType >()

Posts a reference with a empty string Id and verifies the correct error is returned.

Template Parameters
TRefTypeThe type of the reference being modified.
Parameters
PropertyExpressionAn expression indicating the TResource reference property to modify.
Type Constraints
TRefType :IAPIResource 

Definition at line 273 of file BaseResourceTestSuite.cs.

◆ POST_Reference_NonExistantId< TRefType >()

Posts a reference with a non-existent Id and verifies the correct error is returned.

Template Parameters
TRefTypeThe type of the reference being modified.
Parameters
PropertyExpressionAn expression indicating the TResource reference property to modify.
Type Constraints
TRefType :IAPIResource 

Definition at line 283 of file BaseResourceTestSuite.cs.

◆ POST_Reference_NullId< TRefType >()

Posts a reference with a null Id and verifies the correct error is returned.

Template Parameters
TRefTypeThe type of the reference being modified.
Parameters
PropertyExpressionAn expression indicating the TResource reference property to modify.
Type Constraints
TRefType :IAPIResource 

Definition at line 264 of file BaseResourceTestSuite.cs.

◆ POST_ReferenceList_NonExistantId< TRefType >()

Posts a reference list with a non-existent Id and verifies the correct error is returned.

Template Parameters
TRefTypeThe type of the reference being modified.
Parameters
PropertyExpressionAn expression indicating the TResource reference list property to modify.
Type Constraints
TRefType :IAPIResource 

Definition at line 294 of file BaseResourceTestSuite.cs.

◆ POST_StringAttribute_Empty()

void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.POST_StringAttribute_Empty ( Expression< Func< T, string > >  PropertyExpression,
bool shouldSucceed = null 
)
inlineinherited

Post a resource with the specified string set to an empty string.

Parameters
PropertyExpressionAn expression indicating the TResource property to modify.
shouldSucceed(Optional) Whether the action should succeed. Will be automatically determined from the property attributes if not supplied.

Definition at line 209 of file BaseResourceTestSuite.cs.

◆ POST_ThenDoAction()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.POST_ThenDoAction ( T  validToPost,
Action< T toExecute 
)
virtualinherited

Post a valid resource under the assumption that it will succeed, then perform an action on the resulting posted object, then clean up.

Parameters
validToPostThe resource to post.
toExecuteThe action to execute on the posted object after posting and before cleaning up.

Reimplemented in AnalyzeReTesting.Base.BaseResourceWithDataTestSuite< T >.

◆ POST_WithValue< TProperty >()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.POST_WithValue< TProperty > ( Expression< Func< T, TProperty > >  PropertyExpression,
TProperty  newValue,
bool  shouldSucceed 
)
inlinevirtualinherited

Modify a property of the test resource, and then test it.

Template Parameters
TPropertyThe type of the property being modified.
Parameters
PropertyExpressionAn expression indicating the TResource property to modify.
newValueThe new value to give the property being modified.
shouldSucceedWhether the action should succeed.

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer_Unsaveable< T >, and AnalyzeReTesting.Tests.Model.TestSuite_Layer< T >.

Definition at line 178 of file BaseResourceTestSuite.cs.

◆ Test_AttributeFilter_POST_Attribute_Blank()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_LossFilter_AttributeFilter< T >.Test_AttributeFilter_POST_Attribute_Blank ( )
inlinevirtual

Definition at line 345 of file Test_LossFilter.cs.

◆ Test_AttributeFilter_POST_Attribute_Null()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_LossFilter_AttributeFilter< T >.Test_AttributeFilter_POST_Attribute_Null ( )
inlinevirtual

Definition at line 340 of file Test_LossFilter.cs.

◆ Test_LossFilter_POST_Name_Blank()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_LossFilter< T >.Test_LossFilter_POST_Name_Blank ( )
inlinevirtualinherited

Definition at line 374 of file Test_LossFilter.cs.

◆ Test_LossFilter_POST_Name_Null()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_LossFilter< T >.Test_LossFilter_POST_Name_Null ( )
inlinevirtualinherited

Definition at line 369 of file Test_LossFilter.cs.

◆ Test_Reflection_ChangePropertyValueRandomly()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Reflection_ChangePropertyValueRandomly ( )
inlinevirtualinherited

Test reflection utilities meant to randomly change property values in a way that would pass server validation.

Definition at line 453 of file BaseResourceTestSuite.cs.

◆ Test_Resource_DeepCopy()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_DeepCopy ( )
inlinevirtualinherited

Test that any resource can be "Deep Copied", a slower copy method that creates a new duplicate instance of a resource type by serializing it and then deserializing the resulting JSON to a new resource.

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer< T >.

Definition at line 360 of file BaseResourceTestSuite.cs.

◆ Test_Resource_DELETE()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_DELETE ( )
inlinevirtualinherited

◆ Test_Resource_DELETE_NonExistant()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_DELETE_NonExistant ( )
inlinevirtualinherited

Definition at line 319 of file BaseResourceTestSuite.cs.

◆ Test_Resource_GET_AllPropertiesRecognized()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_GET_AllPropertiesRecognized ( )
inlinevirtualinherited

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer< T >.

Definition at line 69 of file BaseResourceTestSuite.cs.

◆ Test_Resource_GET_Existing()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_GET_Existing ( )
inlinevirtualinherited

◆ Test_Resource_GET_Existing_ResolveReferences()

virtual void AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T >.Test_Resource_GET_Existing_ResolveReferences ( )
inlinevirtualinherited

IStoredAPIResource collections support reference resolution.

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer_Unsaveable< T >.

Definition at line 29 of file BaseStoredResourceTestSuite.cs.

◆ Test_Resource_GET_FromBatch()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_GET_FromBatch ( )
inlinevirtualinherited

Test that resources of this type can be retrieved using the collection batch-get feature.

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer_Unsaveable< T >.

Definition at line 91 of file BaseResourceTestSuite.cs.

◆ Test_Resource_GetCollectionName()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_GetCollectionName ( )
inlinevirtualinherited

Verify that all runtime types expose their collection name.

Definition at line 78 of file BaseResourceTestSuite.cs.

◆ Test_Resource_OfflineRandomGeneration()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_OfflineRandomGeneration ( )
inlinevirtualinherited

Test reflection utilities meant to randomly change property values (used for testing comprarer coverage).

Definition at line 409 of file BaseResourceTestSuite.cs.

◆ Test_Resource_OnlineRandomGeneration()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_OnlineRandomGeneration ( )
inlinevirtualinherited

Test reflection utilities meant to randomly change property values in a way that would pass server validation.

Definition at line 436 of file BaseResourceTestSuite.cs.

◆ Test_Resource_POST_CreatedAndModified()

◆ Test_Resource_POST_Description_Blank()

virtual void AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T >.Test_Resource_POST_Description_Blank ( )
inlinevirtualinherited

Definition at line 49 of file BaseStoredResourceTestSuite.cs.

◆ Test_Resource_POST_Description_Null()

virtual void AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T >.Test_Resource_POST_Description_Null ( )
inlinevirtualinherited

Definition at line 43 of file BaseStoredResourceTestSuite.cs.

◆ Test_Resource_POST_ExistingId()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_POST_ExistingId ( )
inlinevirtualinherited

Verifies that it is okay to post an object with an ID that already exists on the server, even if the object is identical to the one already on the server. This is tested by posting a valid resource, and then rePOSTing the returned resource again (including the id property).

TODO: This test is almost meaningless because the JSON serializer used does not even include the ID in the request JSON (as it is a server-generated property). As such, this does not end up testing the behaviour of the server, so much as the behaviour of the client library.

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer_Unsaveable< T >, and AnalyzeReTesting.Tests.Model.TestSuite_OptimizationFunction< T >.

Definition at line 142 of file BaseResourceTestSuite.cs.

◆ Test_Resource_POST_FieldsIdOnly()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_POST_FieldsIdOnly ( )
inlinevirtualinherited

Test that a user can post a resource and get back only the id using the omit query parameter.

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer< T >.

Definition at line 112 of file BaseResourceTestSuite.cs.

◆ Test_Resource_POST_Id_Ignored()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_POST_Id_Ignored ( )
inlinevirtualinherited

No matter what string we set the Id property to, POST should succeed because the Id of the posted resource should be ignored by the server.

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer_Unsaveable< T >.

Definition at line 127 of file BaseResourceTestSuite.cs.

◆ Test_Resource_POST_Metadata_Empty()

virtual void AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T >.Test_Resource_POST_Metadata_Empty ( )
inlinevirtualinherited

Definition at line 76 of file BaseStoredResourceTestSuite.cs.

◆ Test_Resource_POST_Metadata_InvalidValues()

virtual void AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T >.Test_Resource_POST_Metadata_InvalidValues ( )
inlinevirtualinherited

◆ Test_Resource_POST_MetaData_MixedTypes()

virtual void AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T >.Test_Resource_POST_MetaData_MixedTypes ( )
inlinevirtualinherited

◆ Test_Resource_POST_Metadata_Null()

virtual void AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T >.Test_Resource_POST_Metadata_Null ( )
inlinevirtualinherited

Definition at line 71 of file BaseStoredResourceTestSuite.cs.

◆ Test_Resource_POST_Valid()

◆ Test_Resource_PUT_NotAllowed()

virtual void AnalyzeReTesting.Base.BaseImmutableResourceTestSuite< T >.Test_Resource_PUT_NotAllowed ( )
inlinevirtualinherited

Definition at line 23 of file BaseImmutableResourceTestSuite.cs.

◆ Test_Resource_Search()

virtual void AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T >.Test_Resource_Search ( )
inlinevirtualinherited

All resources should support searching in a few fundamental ways.

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer_Unsaveable< T >, and AnalyzeReTesting.Tests.Model.TestSuite_OptimizationFunction< T >.

Definition at line 109 of file BaseStoredResourceTestSuite.cs.

◆ Test_Resource_ShallowCopy()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_ShallowCopy ( )
inlinevirtualinherited

Test that any resource can be "Shallow Copied", which is a quick copy that does a member-wise clone of the object, including private members.

Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_Layer< T >.

Definition at line 348 of file BaseResourceTestSuite.cs.

◆ Test_Resource_TypeReflectionUtilities()

virtual void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.Test_Resource_TypeReflectionUtilities ( )
inlinevirtualinherited

Test reflection utilities meant to get extract information about runtime types.

Definition at line 375 of file BaseResourceTestSuite.cs.

◆ TestCopyHelper< TCopy >()

static void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.TestCopyHelper< TCopy > ( TCopy  original,
Func< TCopy, TCopy copyAction 
)
inlinestaticprotectedinherited
Type Constraints
TCopy :IAPIResource 

Definition at line 488 of file BaseResourceTestSuite.cs.

◆ TestResourceDeleteHelper()

void AnalyzeReTesting.Base.BaseResourceTestSuite< T >.TestResourceDeleteHelper ( T  toDelete,
bool  isDeleteAllowed 
)
inlineprotectedinherited

Definition at line 330 of file BaseResourceTestSuite.cs.

◆ TestSuiteCleanup()

static void AnalyzeReTesting.Base.BaseServerTestSuite.TestSuiteCleanup ( )
inlinestaticinherited

Actions to run once when the C# Unit Tests finish. Note: This method will not automatically be inherited and run by tests suites in different assemblies that import this library. You will need to create your own method with the [AssemblyCleanup] attribute that calls this method.

Definition at line 163 of file BaseServerAPITestSuite.cs.

◆ TestSuiteInitialize()

static void AnalyzeReTesting.Base.BaseServerTestSuite.TestSuiteInitialize ( TestContext  context)
inlinestaticinherited

Actions to run once when the C# Unit Tests initialize. Note: This method will not automatically be inherited and run by tests suites in different assemblies that import this library. You will need to create your own method with the [AssemblyInitialize] attribute that calls this method.

Definition at line 84 of file BaseServerAPITestSuite.cs.

Member Data Documentation

◆ Reflection

Reflection AnalyzeReTesting.Base.BaseClientTestSuite.Reflection
staticinherited

Shared instance of a class for generating random resources.

Definition at line 18 of file BaseClientTestSuite.cs.

◆ Samples

Samples AnalyzeReTesting.Base.BaseClientTestSuite.Samples
staticinherited

Shared instance of a class for generating reusable sample resources.

Definition at line 15 of file BaseClientTestSuite.cs.

Property Documentation

◆ API_AuthenticationToken

IAccessToken AnalyzeReTesting.Base.BaseServerTestSuite.API_AuthenticationToken
staticgetsetinherited

Set the AuthenticationToken to supply to the server before every test (if applicable).

Definition at line 32 of file BaseServerAPITestSuite.cs.

◆ API_URL

string AnalyzeReTesting.Base.BaseServerTestSuite.API_URL
staticgetsetinherited

Location of the REST API being tested against. This can be set using the API_URL environment variable. Default is https://localhost:8000/.

Definition at line 28 of file BaseServerAPITestSuite.cs.

◆ DELETE_Allowed

virtual bool AnalyzeReTesting.Base.BaseResourceTestSuite< T >.DELETE_Allowed
getprotectedinherited

Definition at line 46 of file BaseResourceTestSuite.cs.

◆ DeletingResourcesBetweenTests

bool AnalyzeReTesting.Base.BaseServerTestSuite.DeletingResourcesBetweenTests
getinherited

Determines based on the EnvironmentSettings whether injected resources (such as Samples) are being deleted between each test.

Definition at line 46 of file BaseServerAPITestSuite.cs.

◆ TestContext

TestContext AnalyzeReTesting.Base.BaseTestSuite.TestContext
getsetinherited

Definition at line 20 of file BaseTestSuite.cs.

◆ TestInjectableResource

IInjectableResource<T> AnalyzeReTesting.Base.BaseResourceTestSuite< T >.TestInjectableResource
getabstractprotectedinherited

Deriving class must override the TestResourceFactory to return a disposable POSTable test resource that unit tests can consume.

Returns
A non-null test resource.

Definition at line 51 of file BaseResourceTestSuite.cs.

◆ TestResource

virtual T AnalyzeReTesting.Base.BaseResourceTestSuite< T >.TestResource
getprotectedinherited

The resource used for all unit tests that require a valid prepared but unPOSTed resource.

Definition at line 34 of file BaseResourceTestSuite.cs.

◆ TestResource_Existing

virtual T AnalyzeReTesting.Base.BaseResourceTestSuite< T >.TestResource_Existing
getprotectedinherited

The resource used for all unit tests that require a prepared and already posted resource. Warning, there is no protection against the user invoking "PUT" on this resource and changing the state of the resource on the API for everyone. Users that require a resource that it can make modifications to and test saving those modifications must not use this resource. It's here for speed to avoid having to re-POST the same resource multiple times for read-only purposes.

Definition at line 43 of file BaseResourceTestSuite.cs.

◆ TryPost_RandomTestResources

bool AnalyzeReTesting.Base.BaseResourceTestSuite< T >.TryPost_RandomTestResources = true
getsetinherited

Allows deriving classes to disable attempting to POST and validate random resources generated by the Test_Resource_OnlineRandomGeneration base tests method - since some randomly generated resources can wreak havoc on the server. When we have some time to "disaster-proof" the server, we should turn these on and solve the problems encountered.

Definition at line 426 of file BaseResourceTestSuite.cs.

◆ TryRunAdditionalValidResourceTests_RandomTestResources

bool AnalyzeReTesting.Base.BaseResourceTestSuite< T >.TryRunAdditionalValidResourceTests_RandomTestResources = true
getsetinherited

Similar to TryPost_RandomTestResources - but controls whether these resources have the AdditionalValidResourceTests method run on them.

Definition at line 431 of file BaseResourceTestSuite.cs.


The documentation for this class was generated from the following file: