C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeReTesting.Tests.Model.TestSuite_Agent Class Referencesealed

Public Member Functions

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.
 
void Test_Agent_POST_Hostname_Blank ()
 
void Test_Agent_POST_Hostname_Null ()
 
void Test_Agent_PUT_Hostname ()
 
void Test_Agent_PUT_Hostname_Blank ()
 
void Test_Agent_PUT_Hostname_Null ()
 
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 ()
 

Protected Member Functions

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.
 

Properties

override IInjectableResource< AgentTestInjectableResource [get]
 

Detailed Description

Definition at line 25 of file Test_Agent.cs.

Inheritance diagram for AnalyzeReTesting.Tests.Model.TestSuite_Agent:
AnalyzeReTesting.Base.BaseMutableResourceTestSuite< Agent >

Member Function Documentation

◆ 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.

◆ 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

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.

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.

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.

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.

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

void AnalyzeReTesting.Tests.Model.TestSuite_Agent.Test_Agent_POST_Hostname_Blank ( )
inline

Definition at line 41 of file Test_Agent.cs.

◆ Test_Agent_POST_Hostname_Null()

void AnalyzeReTesting.Tests.Model.TestSuite_Agent.Test_Agent_POST_Hostname_Null ( )
inline

Definition at line 36 of file Test_Agent.cs.

◆ Test_Agent_PUT_Hostname()

void AnalyzeReTesting.Tests.Model.TestSuite_Agent.Test_Agent_PUT_Hostname ( )
inline

Definition at line 51 of file Test_Agent.cs.

◆ Test_Agent_PUT_Hostname_Blank()

void AnalyzeReTesting.Tests.Model.TestSuite_Agent.Test_Agent_PUT_Hostname_Blank ( )
inline

Definition at line 61 of file Test_Agent.cs.

◆ Test_Agent_PUT_Hostname_Null()

void AnalyzeReTesting.Tests.Model.TestSuite_Agent.Test_Agent_PUT_Hostname_Null ( )
inline

Definition at line 56 of file Test_Agent.cs.

◆ Test_Resource_PUT_CreatedAndModified()

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

Definition at line 55 of file BaseMutableResourceTestSuite.cs.

◆ Test_Resource_PUT_Description()

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

Definition at line 35 of file BaseMutableResourceTestSuite.cs.

◆ Test_Resource_PUT_Description_Blank()

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

Definition at line 47 of file BaseMutableResourceTestSuite.cs.

◆ Test_Resource_PUT_Description_Null()

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

Definition at line 41 of file BaseMutableResourceTestSuite.cs.

◆ Test_Resource_PUT_Metadata_Empty()

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

Definition at line 79 of file BaseMutableResourceTestSuite.cs.

◆ Test_Resource_PUT_Metadata_InvalidValues()

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

Definition at line 96 of file BaseMutableResourceTestSuite.cs.

◆ Test_Resource_PUT_Metadata_MixedTypes()

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

Definition at line 84 of file BaseMutableResourceTestSuite.cs.

◆ Test_Resource_PUT_Metadata_Null()

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

Definition at line 74 of file BaseMutableResourceTestSuite.cs.

◆ Test_Resource_PUT_NoChanges()

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

Definition at line 27 of file BaseMutableResourceTestSuite.cs.

Property Documentation

◆ TestInjectableResource

override IInjectableResource<Agent> AnalyzeReTesting.Tests.Model.TestSuite_Agent.TestInjectableResource
getprotected

Definition at line 30 of file Test_Agent.cs.


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