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

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 layer that also tries adding it to a layer_view, and even simulating that layer_view.
 
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.
 
override void POST_WithValue< TProperty > (Expression< Func< T, TProperty > > PropertyExpression, TProperty newValue, bool shouldSucceed)
 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.

 
virtual void POST_WithValue_Inconsistent< TProperty > (Expression< Func< T, TProperty > > PropertyExpression, TProperty newValue, bool layerPostSucceeeds)
 Similar to POST_WithValue<TProperty>, except asserts the additional (odd) behaviour that success or failure of the POST is opposite for layers and layer_views. This is necessary because some layer types or values are only permitted when the layer is defined as part of a layer_view definitions.
 
void PUT_Attribute_Null< TProperty > (Expression< Func< T, TProperty > > PropertyExpression)
 Ensure that when doing a PUT with the specified attribute null, the original value of the attribute is unchanged.
 
void PUT_ListAttribute_Duplicates< TItem, TValue > (Expression< Func< T, ICollection< TItem > > > PropertyExpression, TValue valueToDuplicate, bool shouldSucceed)
 
void PUT_ListAttribute_Empty< TItem > (Expression< Func< T, ICollection< TItem > > > PropertyExpression, bool? shouldSucceed=null)
 
void PUT_Reference_EmptyStringId< TRefType > (Expression< Func< T, IReference< TRefType > > > PropertyExpression)
 Modifies a reference with a empty string Id and verifies the correct error is returned.
 
void PUT_Reference_NonExistantId< TRefType > (Expression< Func< T, IReference< TRefType > > > PropertyExpression)
 Modifies a reference with a non-existent Id and verifies the correct error is returned.
 
void PUT_Reference_NullId< TRefType > (Expression< Func< T, IReference< TRefType > > > PropertyExpression)
 Modifies a reference with a null Id and verifies the correct error is returned.
 
void PUT_ReferenceList_NonExistantId< TRefType > (Expression< Func< T, ICollection< IReference< TRefType > > > > PropertyExpression)
 Modifies a reference list with a non-existent Id and verifies the correct error is returned.
 
void PUT_StringAttribute_Empty (Expression< Func< T, string > > PropertyExpression, bool? shouldSucceed=null)
 Ensure that when doing a PUT with the specified attribute set to an empty string, the PUT succeeds or fails with the correct error.
 
T PUT_WithChanges_Fails (Func< T, T > modifyTestResource)
 POST a valid resource, then test doing a PUT on the resource after modifying it in some way, and assert that the PUT fails due to a "BadRequest" error.
 
virtual T PUT_WithChanges_Succeeds (Func< T, T > modifyTestResource)
 POST a valid resource, then test doing a PUT on the resource after modifying it in some way, and assert that the PUT succeeds.
 
T PUT_WithValue< TProperty > (Expression< Func< T, TProperty > > PropertyExpression, TProperty newValue, bool shouldSucceed)
 POST a valid resource, then test doing a PUT on the resource after changing a specified attribute.
 
virtual void Test_Layer_Saveable ()
 As a sanity check, layers that are saveable should not carry the NotSaveableAttribute. This is of course overridden to test the opposite in TestSuite_Layer_Unsaveable<T>.
 
virtual void Test_Layer_WithLossSets_POST_LossSet_NotFinalized ()
 
virtual void Test_Layer_WithLossSets_POST_LossSets_Duplicates ()
 
virtual void Test_Layer_WithLossSets_POST_LossSets_Empty ()
 
virtual void Test_Layer_WithLossSets_POST_LossSets_Invalid ()
 
virtual void Test_Layer_WithLossSets_POST_LossSets_Null ()
 
virtual void Test_Layer_WithLossSets_POST_Policy_Duplicates ()
 
virtual void Test_Layer_WithLossSets_POST_Policy_Empty ()
 
virtual void Test_Layer_WithLossSets_POST_Policy_ForwardAll ()
 
virtual void Test_Layer_WithLossSets_POST_Policy_Null ()
 
virtual void Test_Layer_WithLossSets_POST_Policy_TransformAll ()
 
virtual void Test_Layer_WithLossSets_PUT_LossSet_NotFinalized ()
 
virtual void Test_Layer_WithLossSets_PUT_LossSets ()
 
virtual void Test_Layer_WithLossSets_PUT_LossSets_Duplicates ()
 
virtual void Test_Layer_WithLossSets_PUT_LossSets_Empty ()
 
virtual void Test_Layer_WithLossSets_PUT_LossSets_Invalid ()
 
virtual void Test_Layer_WithLossSets_PUT_Policy ()
 
virtual void Test_Layer_WithLossSets_PUT_Policy_Duplicates ()
 
virtual void Test_Layer_WithLossSets_PUT_Policy_Empty ()
 
virtual void Test_Layer_WithLossSets_PUT_Policy_ForwardAll ()
 
virtual void Test_Layer_WithLossSets_PUT_Policy_TransformAll ()
 
virtual void Test_Reflection_ChangePropertyValueRandomly ()
 Test reflection utilities meant to randomly change property values in a way that would pass server validation.
 
override 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 ()
 
override void Test_Resource_GET_AllPropertiesRecognized ()
 
virtual void Test_Resource_GET_As_Inlined ()
 
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).
 
override 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_CreatedAndModified ()
 
virtual void Test_Resource_PUT_Description ()
 
virtual void Test_Resource_PUT_Description_Blank ()
 
virtual void Test_Resource_PUT_Description_Null ()
 
virtual void Test_Resource_PUT_Metadata_Empty ()
 
virtual void Test_Resource_PUT_Metadata_InvalidValues ()
 
virtual void Test_Resource_PUT_Metadata_MixedTypes ()
 
virtual void Test_Resource_PUT_Metadata_Null ()
 
virtual void Test_Resource_PUT_NoChanges ()
 
virtual void Test_Resource_Search ()
 All resources should support searching in a few fundamental ways.
 
override 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)
 
virtual T POST_ForPutTest (T validToPost, Action< T > putTest)
 Used for all PUT tests and PUT helper methods. Similar to the base helper method BaseResourceTestSuite<T>.POST_ThenDoAction, but kept separate because they may be overridden differently. In particular, the BaseResourceWithDataTestSuite<T> needs to override the standard POST to upload data, but leave out the data when preparing for PUT tests, because these resources are only mutable while data upload is pending.
 
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

Type Constraints
T :Layer_WithLossSets 

Definition at line 3248 of file Test_Layer.cs.

Inheritance diagram for AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >:
AnalyzeReTesting.Tests.Model.TestSuite_Layer< T > AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T > AnalyzeReTesting.Base.BaseStoredResourceTestSuite< T > AnalyzeReTesting.Base.BaseResourceTestSuite< T > AnalyzeReTesting.Base.BaseServerTestSuite AnalyzeReTesting.Base.BaseClientTestSuite AnalyzeReTesting.Base.BaseTestSuite AnalyzeReTesting.Tests.Model.TestSuite_Layer_Unsaveable< T > AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithTerms< T > AnalyzeReTesting.Tests.Model.TestSuite_Layer_QuotaShare_Base< T > AnalyzeReTesting.Tests.Model.TestSuite_Layer_XL< T > AnalyzeReTesting.Tests.Model.TestSuite_Layer_AggXL_Base< 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_Layer< 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 layer that also tries adding it to a layer_view, and even simulating that layer_view.

Deriving classes can optionally override this function to perform additional validation on every successfully POSTed resource.

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_ForPutTest()

virtual T AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.POST_ForPutTest ( T  validToPost,
Action< T putTest 
)
protectedvirtualinherited

Used for all PUT tests and PUT helper methods. Similar to the base helper method BaseResourceTestSuite<T>.POST_ThenDoAction, but kept separate because they may be overridden differently. In particular, the BaseResourceWithDataTestSuite<T> needs to override the standard POST to upload data, but leave out the data when preparing for PUT tests, because these resources are only mutable while data upload is pending.

Parameters
validToPostThe resource to post.
putTestThe test to perform following the successful POST of the base resource.
Returns
The resource created for the PUT test.

◆ 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 >()

override void AnalyzeReTesting.Tests.Model.TestSuite_Layer< 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 from AnalyzeReTesting.Base.BaseResourceTestSuite< T >.

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

Definition at line 3447 of file Test_Layer.cs.

◆ POST_WithValue_Inconsistent< TProperty >()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer< T >.POST_WithValue_Inconsistent< TProperty > ( Expression< Func< T, TProperty > >  PropertyExpression,
TProperty  newValue,
bool  layerPostSucceeeds 
)
inlinevirtualinherited

Similar to POST_WithValue<TProperty>, except asserts the additional (odd) behaviour that success or failure of the POST is opposite for layers and layer_views. This is necessary because some layer types or values are only permitted when the layer is defined as part of a layer_view definitions.

Template Parameters
TPropertyThe type of layer property being modified.
Parameters
PropertyExpressionThe layer property to modify.
newValueThe new value to assign the property.
layerPostSucceeedsWhether the Layer POST should succeed. If set to true, the expectation is that the layer_view post will fail. If set to false, the expectation is that the layer_view post will succeed.

Definition at line 3469 of file Test_Layer.cs.

◆ PUT_Attribute_Null< TProperty >()

Ensure that when doing a PUT with the specified attribute null, the original value of the attribute is unchanged.

As reported in BUG ARE-2618, there are several inconsistencies with how 'null' (or omitted) properties are handled by the server. Sometimes it "resets" them to their default value, and sometimes it leaves them unchanged. TODO: Change this test to check the behaviour when the property is initially set to some value other than the default value - so that we can see whether the server property is actually leaving the current value alone, or resetting it to its default.

Template Parameters
TPropertyThe type of the property being modified.
Parameters
PropertyExpressionAn expression indicating the T property to modify.
Exceptions
ArgumentExceptionCan only be used on properties whose default type is null.

Definition at line 176 of file BaseMutableResourceTestSuite.cs.

◆ PUT_ListAttribute_Duplicates< TItem, TValue >()

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

Definition at line 207 of file BaseMutableResourceTestSuite.cs.

◆ PUT_ListAttribute_Empty< TItem >()

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

Definition at line 197 of file BaseMutableResourceTestSuite.cs.

◆ PUT_Reference_EmptyStringId< TRefType >()

Modifies 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 235 of file BaseMutableResourceTestSuite.cs.

◆ PUT_Reference_NonExistantId< TRefType >()

Modifies 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 246 of file BaseMutableResourceTestSuite.cs.

◆ PUT_Reference_NullId< TRefType >()

Modifies 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 225 of file BaseMutableResourceTestSuite.cs.

◆ PUT_ReferenceList_NonExistantId< TRefType >()

Modifies 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 256 of file BaseMutableResourceTestSuite.cs.

◆ PUT_StringAttribute_Empty()

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

Ensure that when doing a PUT with the specified attribute set to an empty string, the PUT succeeds or fails with the correct error.

Definition at line 186 of file BaseMutableResourceTestSuite.cs.

◆ PUT_WithChanges_Fails()

T AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.PUT_WithChanges_Fails ( Func< T, T modifyTestResource)
inherited

POST a valid resource, then test doing a PUT on the resource after modifying it in some way, and assert that the PUT fails due to a "BadRequest" error.

Parameters
modifyTestResourceA function to modify the test resource for put.
Returns
The test resource created for test, and modified in preparation for the PUT test.

◆ PUT_WithChanges_Succeeds()

virtual T AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.PUT_WithChanges_Succeeds ( Func< T, T modifyTestResource)
inlinevirtualinherited

POST a valid resource, then test doing a PUT on the resource after modifying it in some way, and assert that the PUT succeeds.

Parameters
modifyTestResourceA function to modify the test resource for put.
Returns
The PUT response.

Definition at line 140 of file BaseMutableResourceTestSuite.cs.

◆ PUT_WithValue< TProperty >()

T AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.PUT_WithValue< TProperty > ( Expression< Func< T, TProperty > >  PropertyExpression,
TProperty  newValue,
bool  shouldSucceed 
)
inlineinherited

POST a valid resource, then test doing a PUT on the resource after changing a specified attribute.

Template Parameters
TPropertyThe type of the property being modified.
Parameters
PropertyExpressionAn expression indicating the T property to modify.
newValueThe new value to give the property being modified.
shouldSucceedWhether the action should succeed.
Returns
The resource that was created and, if successful, subsequently modified.

Definition at line 128 of file BaseMutableResourceTestSuite.cs.

◆ Test_Layer_Saveable()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer< T >.Test_Layer_Saveable ( )
inlinevirtualinherited

As a sanity check, layers that are saveable should not carry the NotSaveableAttribute. This is of course overridden to test the opposite in TestSuite_Layer_Unsaveable<T>.

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

Definition at line 3415 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_LossSet_NotFinalized()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_LossSet_NotFinalized ( )
inlinevirtual

Definition at line 3276 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_LossSets_Duplicates()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_LossSets_Duplicates ( )
inlinevirtual

Definition at line 3265 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_LossSets_Empty()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_LossSets_Empty ( )
inlinevirtual

Definition at line 3260 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_LossSets_Invalid()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_LossSets_Invalid ( )
inlinevirtual

Definition at line 3271 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_LossSets_Null()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_LossSets_Null ( )
inlinevirtual

Definition at line 3255 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_Policy_Duplicates()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_Policy_Duplicates ( )
inlinevirtual

Definition at line 3313 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_Policy_Empty()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_Policy_Empty ( )
inlinevirtual

Definition at line 3308 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_Policy_ForwardAll()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_Policy_ForwardAll ( )
inlinevirtual

Definition at line 3303 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_Policy_Null()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_Policy_Null ( )
inlinevirtual

Definition at line 3293 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_POST_Policy_TransformAll()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_POST_Policy_TransformAll ( )
inlinevirtual

Definition at line 3298 of file Test_Layer.cs.

◆ Test_Layer_WithLossSets_PUT_LossSet_NotFinalized()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_LossSet_NotFinalized ( )
inlinevirtual

◆ Test_Layer_WithLossSets_PUT_LossSets()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_LossSets ( )
inlinevirtual

◆ Test_Layer_WithLossSets_PUT_LossSets_Duplicates()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_LossSets_Duplicates ( )
inlinevirtual

◆ Test_Layer_WithLossSets_PUT_LossSets_Empty()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_LossSets_Empty ( )
inlinevirtual

◆ Test_Layer_WithLossSets_PUT_LossSets_Invalid()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_LossSets_Invalid ( )
inlinevirtual

◆ Test_Layer_WithLossSets_PUT_Policy()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_Policy ( )
inlinevirtual

◆ Test_Layer_WithLossSets_PUT_Policy_Duplicates()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_Policy_Duplicates ( )
inlinevirtual

◆ Test_Layer_WithLossSets_PUT_Policy_Empty()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_Policy_Empty ( )
inlinevirtual

◆ Test_Layer_WithLossSets_PUT_Policy_ForwardAll()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_Policy_ForwardAll ( )
inlinevirtual

◆ Test_Layer_WithLossSets_PUT_Policy_TransformAll()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer_WithLossSets< T >.Test_Layer_WithLossSets_PUT_Policy_TransformAll ( )
inlinevirtual

◆ 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()

override void AnalyzeReTesting.Tests.Model.TestSuite_Layer< 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 from AnalyzeReTesting.Base.BaseResourceTestSuite< T >.

Definition at line 3506 of file Test_Layer.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()

override void AnalyzeReTesting.Tests.Model.TestSuite_Layer< T >.Test_Resource_GET_AllPropertiesRecognized ( )
inlinevirtualinherited

Reimplemented from AnalyzeReTesting.Base.BaseResourceTestSuite< T >.

Definition at line 3434 of file Test_Layer.cs.

◆ Test_Resource_GET_As_Inlined()

virtual void AnalyzeReTesting.Tests.Model.TestSuite_Layer< T >.Test_Resource_GET_As_Inlined ( )
inlinevirtualinherited

Definition at line 3426 of file Test_Layer.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()

override void AnalyzeReTesting.Tests.Model.TestSuite_Layer< 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 from AnalyzeReTesting.Base.BaseResourceTestSuite< T >.

Definition at line 3486 of file Test_Layer.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_CreatedAndModified()

virtual void AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.Test_Resource_PUT_CreatedAndModified ( )
inlinevirtualinherited

◆ Test_Resource_PUT_Description()

virtual void AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.Test_Resource_PUT_Description ( )
inlinevirtualinherited

◆ Test_Resource_PUT_Description_Blank()

virtual void AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.Test_Resource_PUT_Description_Blank ( )
inlinevirtualinherited

◆ Test_Resource_PUT_Description_Null()

virtual void AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.Test_Resource_PUT_Description_Null ( )
inlinevirtualinherited

◆ Test_Resource_PUT_Metadata_Empty()

virtual void AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.Test_Resource_PUT_Metadata_Empty ( )
inlinevirtualinherited

◆ Test_Resource_PUT_Metadata_InvalidValues()

virtual void AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.Test_Resource_PUT_Metadata_InvalidValues ( )
inlinevirtualinherited

◆ Test_Resource_PUT_Metadata_MixedTypes()

virtual void AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.Test_Resource_PUT_Metadata_MixedTypes ( )
inlinevirtualinherited

◆ Test_Resource_PUT_Metadata_Null()

virtual void AnalyzeReTesting.Base.BaseMutableResourceTestSuite< T >.Test_Resource_PUT_Metadata_Null ( )
inlinevirtualinherited

◆ Test_Resource_PUT_NoChanges()

◆ 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()

override void AnalyzeReTesting.Tests.Model.TestSuite_Layer< 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 from AnalyzeReTesting.Base.BaseResourceTestSuite< T >.

Definition at line 3496 of file Test_Layer.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: