C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods Class Reference

Public Member Functions

void BaseTest_Cleanup ()
 
void BaseTest_Initialize ()
 
void Test_API_BatchListItems ()
 
void Test_API_GET_Exceedance_Probability_Thresholds ()
 Should be able to support a variety of thresholds without loss of precision.
 
void Test_API_GET_GenericInterface ()
 Test GET using a generic interface type, deserializing to a generic interface identifier with a specified type parameter.
 
void Test_API_GET_GenericType_GenericInterface ()
 Test GET using a generic resource type, deserializing to a generic interface identifier with an interface type parameter.
 
void Test_API_GET_GenericType_GenericInterface_SpecifiedType ()
 Test GET using a generic resource type, deserializing to a generic interface identifier with a specified type parameter.
 
void Test_API_GET_GenericType_Interface ()
 Test GET using a generic resource type, deserializing to an interface identifier.
 
void Test_API_GET_Interface ()
 Test GET using a generic interface type, deserializing to a generic interface identifier with a specified type parameter.
 
void Test_API_GET_Metrics_Probabilities ()
 Should be able to support every return period between 0 and 10 million without loss of precision on the probability.
 
void Test_API_GET_NoParams_Basic ()
 Test the simplest use of GET using a non-derived, instantiable resource type.
 
void Test_API_GET_ResolveReferences ()
 Test the GET method with an HTTP header parameter that expands references.
 
void Test_API_GET_SpecifiedType_AbstractBase ()
 Test GET using a derived resource type, deserializing to an abstract base identifier.
 
void Test_API_GET_SpecifiedType_Interface ()
 Test GET using a derived resource type, deserializing to an interface identifier.
 
void Test_API_GET_WithoutInstance ()
 Test the API.GET static method.
 
void Test_API_GetResourceList_CollectionNameOverride ()
 Test GetResourceList using a manually specified collection name and base type.
 
void Test_API_GetResourceList_GenericType_GenericInterface ()
 Test a generic interface with a covariant generic parameter.
 
void Test_API_GetResourceList_GenericType_GenericInterface_TypeSpecified ()
 Test a generic interface with an instantiable resource type parameter specified.
 
void Test_API_GetResourceList_GenericType_GenericType_CovariantlyInvalid ()
 Test a generic class with an interface type parameter specified.
 
void Test_API_GetResourceList_GenericType_GenericType_TypeSpecified ()
 Test a generic class with an instantiable resource type parameter specified.
 
void Test_API_GetResourceList_GenericType_Interface ()
 Test an interface where the collection is first implemented in a generic type.
 
void Test_API_GetResourceList_NoParams_Basic ()
 Test the simplest use of GetResourceList using a non-derived, instantiable resource type.
 
void Test_API_GetResourceList_SpecifiedType_Derived ()
 Can we retrieve the list for a derived instantiable type, and get back only results of that type?
 
void Test_API_GetResourceList_SpecifiedType_UninstantiableAbstractBase ()
 Can we retrieve the list for a non-instantiable abstract base type, and get back results that derive from that type?
 
void Test_API_GetResourceList_SpecifiedType_UninstantiableInterface ()
 Can we retrieve the list for a non-instantiable resource type interface, and get back results that implement the interface?
 
void Test_API_GetStream_Matches_Get ()
 Test use of GetStream - write to string stream, and assert it matches the results of a normal GET.
 
void Test_API_GetStream_ToLargeFileUpload ()
 Test ability to stream data from one resource to a new one being posted.
 
void Test_API_OPTIONS ()
 Test the OPTIONS method.
 
void Test_API_OPTIONS_Optimization_Supported ()
 Test the OPTIONS method.
 
void Test_API_POST_GenericType_GenericInterface ()
 Test POST using a generic resource type, deserializing to a generic interface identifier with an interface type parameter.
 
void Test_API_POST_GenericType_GenericInterface_SpecifiedType ()
 Test POST using a generic resource type, deserializing to a generic interface identifier with a specified type parameter.
 
void Test_API_POST_GenericType_Interface ()
 Test POST using a generic resource type, deserializing to an interface identifier.
 
void Test_API_POST_NoParams_Basic ()
 Test the simplest use of POST using a non-derived, instantiable resource type.
 
void Test_API_POST_SpecifiedType_AbstractBase ()
 Test POST using a derived resource type, deserializing to an abstract base identifier.
 
void Test_API_POST_SpecifiedType_Interface ()
 Test POST using a derived resource type, deserializing to an interface identifier.
 
void Test_API_PUT_NoParams_Basic ()
 Test the simplest use of PUT using a simple instantiable resource type.
 
void Test_API_PUT_SpecifiedType_AbstractBase ()
 Test PUT using a derived resource type, deserializing to an abstract base identifier.
 
void Test_API_PUT_SpecifiedType_Interface ()
 Test PUT using a derived resource type, deserializing to an interface identifier.
 
void Test_API_SearchResourceList ()
 Set some meta_data, POST it, invoke API.SearchResourceList<T> with a matching query and verify that the meta_data is the same.
 

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

Static Protected Member Functions

static void BaseClass_Cleanup (Action action)
 
static void BaseClass_Initialize (TestContext context, Action action)
 

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/.
 
bool DeletingResourcesBetweenTests [get]
 Determines based on the EnvironmentSettings whether injected resources (such as Samples) are being deleted between each test.
 
TestContext TestContext [get, set]
 

Detailed Description

Definition at line 30 of file Test_API_REST_Methods.cs.

Inheritance diagram for AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods:
AnalyzeReTesting.Base.BaseServerTestSuite AnalyzeReTesting.Base.BaseClientTestSuite AnalyzeReTesting.Base.BaseTestSuite

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.

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

◆ Test_API_BatchListItems()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_BatchListItems ( )
inline

Definition at line 540 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_Exceedance_Probability_Thresholds()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_Exceedance_Probability_Thresholds ( )
inline

Should be able to support a variety of thresholds without loss of precision.

Definition at line 660 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_GenericInterface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_GenericInterface ( )
inline

Test GET using a generic interface type, deserializing to a generic interface identifier with a specified type parameter.

Definition at line 161 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_GenericType_GenericInterface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_GenericType_GenericInterface ( )
inline

Test GET using a generic resource type, deserializing to a generic interface identifier with an interface type parameter.

Definition at line 134 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_GenericType_GenericInterface_SpecifiedType()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_GenericType_GenericInterface_SpecifiedType ( )
inline

Test GET using a generic resource type, deserializing to a generic interface identifier with a specified type parameter.

Definition at line 143 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_GenericType_Interface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_GenericType_Interface ( )
inline

Test GET using a generic resource type, deserializing to an interface identifier.

Definition at line 125 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_Interface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_Interface ( )
inline

Test GET using a generic interface type, deserializing to a generic interface identifier with a specified type parameter.

Definition at line 152 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_Metrics_Probabilities()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_Metrics_Probabilities ( )
inline

Should be able to support every return period between 0 and 10 million without loss of precision on the probability.

Definition at line 640 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_NoParams_Basic()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_NoParams_Basic ( )
inline

Test the simplest use of GET using a non-derived, instantiable resource type.

Definition at line 101 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_ResolveReferences()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_ResolveReferences ( )
inline

Test the GET method with an HTTP header parameter that expands references.

Definition at line 62 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_SpecifiedType_AbstractBase()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_SpecifiedType_AbstractBase ( )
inline

Test GET using a derived resource type, deserializing to an abstract base identifier.

Definition at line 109 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_SpecifiedType_Interface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_SpecifiedType_Interface ( )
inline

Test GET using a derived resource type, deserializing to an interface identifier.

Definition at line 117 of file Test_API_REST_Methods.cs.

◆ Test_API_GET_WithoutInstance()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GET_WithoutInstance ( )
inline

Test the API.GET static method.

Definition at line 73 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_CollectionNameOverride()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_CollectionNameOverride ( )
inline

Test GetResourceList using a manually specified collection name and base type.

Definition at line 338 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_GenericType_GenericInterface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_GenericType_GenericInterface ( )
inline

Test a generic interface with a covariant generic parameter.

Definition at line 398 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_GenericType_GenericInterface_TypeSpecified()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_GenericType_GenericInterface_TypeSpecified ( )
inline

Test a generic interface with an instantiable resource type parameter specified.

Definition at line 407 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_GenericType_GenericType_CovariantlyInvalid()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_GenericType_GenericType_CovariantlyInvalid ( )
inline

Test a generic class with an interface type parameter specified.

Definition at line 425 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_GenericType_GenericType_TypeSpecified()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_GenericType_GenericType_TypeSpecified ( )
inline

Test a generic class with an instantiable resource type parameter specified.

Definition at line 416 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_GenericType_Interface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_GenericType_Interface ( )
inline

Test an interface where the collection is first implemented in a generic type.

Definition at line 389 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_NoParams_Basic()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_NoParams_Basic ( )
inline

Test the simplest use of GetResourceList using a non-derived, instantiable resource type.

Definition at line 329 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_SpecifiedType_Derived()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_SpecifiedType_Derived ( )
inline

Can we retrieve the list for a derived instantiable type, and get back only results of that type?

Definition at line 355 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_SpecifiedType_UninstantiableAbstractBase()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_SpecifiedType_UninstantiableAbstractBase ( )
inline

Can we retrieve the list for a non-instantiable abstract base type, and get back results that derive from that type?

Definition at line 365 of file Test_API_REST_Methods.cs.

◆ Test_API_GetResourceList_SpecifiedType_UninstantiableInterface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetResourceList_SpecifiedType_UninstantiableInterface ( )
inline

Can we retrieve the list for a non-instantiable resource type interface, and get back results that implement the interface?

Definition at line 375 of file Test_API_REST_Methods.cs.

◆ Test_API_GetStream_Matches_Get()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetStream_Matches_Get ( )
inline

Test use of GetStream - write to string stream, and assert it matches the results of a normal GET.

Definition at line 578 of file Test_API_REST_Methods.cs.

◆ Test_API_GetStream_ToLargeFileUpload()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_GetStream_ToLargeFileUpload ( )
inline

Test ability to stream data from one resource to a new one being posted.

Definition at line 606 of file Test_API_REST_Methods.cs.

◆ Test_API_OPTIONS()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_OPTIONS ( )
inline

Test the OPTIONS method.

Definition at line 37 of file Test_API_REST_Methods.cs.

◆ Test_API_OPTIONS_Optimization_Supported()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_OPTIONS_Optimization_Supported ( )
inline

Test the OPTIONS method.

Definition at line 48 of file Test_API_REST_Methods.cs.

◆ Test_API_POST_GenericType_GenericInterface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_POST_GenericType_GenericInterface ( )
inline

Test POST using a generic resource type, deserializing to a generic interface identifier with an interface type parameter.

Definition at line 228 of file Test_API_REST_Methods.cs.

◆ Test_API_POST_GenericType_GenericInterface_SpecifiedType()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_POST_GenericType_GenericInterface_SpecifiedType ( )
inline

Test POST using a generic resource type, deserializing to a generic interface identifier with a specified type parameter.

Definition at line 237 of file Test_API_REST_Methods.cs.

◆ Test_API_POST_GenericType_Interface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_POST_GenericType_Interface ( )
inline

Test POST using a generic resource type, deserializing to an interface identifier.

Definition at line 219 of file Test_API_REST_Methods.cs.

◆ Test_API_POST_NoParams_Basic()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_POST_NoParams_Basic ( )
inline

Test the simplest use of POST using a non-derived, instantiable resource type.

Definition at line 195 of file Test_API_REST_Methods.cs.

◆ Test_API_POST_SpecifiedType_AbstractBase()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_POST_SpecifiedType_AbstractBase ( )
inline

Test POST using a derived resource type, deserializing to an abstract base identifier.

Definition at line 203 of file Test_API_REST_Methods.cs.

◆ Test_API_POST_SpecifiedType_Interface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_POST_SpecifiedType_Interface ( )
inline

Test POST using a derived resource type, deserializing to an interface identifier.

Definition at line 211 of file Test_API_REST_Methods.cs.

◆ Test_API_PUT_NoParams_Basic()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_PUT_NoParams_Basic ( )
inline

Test the simplest use of PUT using a simple instantiable resource type.

Definition at line 271 of file Test_API_REST_Methods.cs.

◆ Test_API_PUT_SpecifiedType_AbstractBase()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_PUT_SpecifiedType_AbstractBase ( )
inline

Test PUT using a derived resource type, deserializing to an abstract base identifier.

Definition at line 282 of file Test_API_REST_Methods.cs.

◆ Test_API_PUT_SpecifiedType_Interface()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_PUT_SpecifiedType_Interface ( )
inline

Test PUT using a derived resource type, deserializing to an interface identifier.

Definition at line 290 of file Test_API_REST_Methods.cs.

◆ Test_API_SearchResourceList()

void AnalyzeReTesting.Tests.AnalyzeReAPI.TestSuite_REST_Methods.Test_API_SearchResourceList ( )
inline

Set some meta_data, POST it, invoke API.SearchResourceList<T> with a matching query and verify that the meta_data is the same.

Definition at line 511 of file Test_API_REST_Methods.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.

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


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