C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Tests for a collection (or base resource type) which do not require an instance of that resource to be defined, and does not need to be re-tested for each derived resource sub-type. More...
Public Member Functions | |
void | BaseTest_Cleanup () |
void | BaseTest_Initialize () |
virtual void | Test_Resource_GET_BadlyFormed () |
Verify that doing a get for a resource with a malformed id returns a NotFound error. | |
virtual void | Test_Resource_GET_Collection () |
virtual void | Test_Resource_GET_Collection_AllTypes () |
virtual void | Test_Resource_GET_Collection_AllTypes_Pagination () |
virtual void | Test_Resource_GET_EmptyID () |
virtual void | Test_Resource_GET_NonExistant () |
Verify that doing a get for a resource that doesn't exist returns a NotFound error. | |
virtual void | Test_Resource_GET_NullID () |
virtual void | Test_Resource_POST_AllTypes () |
virtual void | Test_Resource_PUT_BadlyFormed () |
Verify that doing a PUT for a resource with a malformed id returns a NotFound error. | |
virtual void | Test_Resource_PUT_EmptyID () |
virtual void | Test_Resource_PUT_NonExistant () |
Verify that doing a PUT for a resource that doesn't exist returns a NotFound error. | |
virtual void | Test_Resource_PUT_NullID () |
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/. | |
IResourceCollection< T > | collection_source [get] |
The ICollection object that can be used to retrieve resources of this type (as an alternative to the GetResourceList method.) | |
bool | DeletingResourcesBetweenTests [get] |
Determines based on the EnvironmentSettings whether injected resources (such as Samples) are being deleted between each test. | |
virtual bool | PUT_Allowed [get] |
Whether resources of this type support the PUT method. Deriving class should override the below if the default behaviour isn't desired. | |
TestContext | TestContext [get, set] |
Tests for a collection (or base resource type) which do not require an instance of that resource to be defined, and does not need to be re-tested for each derived resource sub-type.
T | The resource type which defines the collection endpoint. |
T | : | IAPIResource |
Definition at line 49 of file BaseAbstractResourceTestsSuite.cs.
|
inlineprotectedinherited |
Definition at line 80 of file BaseTestSuite.cs.
|
inlineprotectedinherited |
Definition at line 75 of file BaseTestSuite.cs.
|
inlinestaticinherited |
Apply the current configured API_URL and API_AuthenticationToken credentials to the static API.
Definition at line 226 of file BaseServerAPITestSuite.cs.
|
inlinestaticprotectedinherited |
Definition at line 66 of file BaseTestSuite.cs.
|
inlinestaticprotectedinherited |
Definition at line 56 of file BaseTestSuite.cs.
|
inlineinherited |
Definition at line 46 of file BaseTestSuite.cs.
|
inlineinherited |
Definition at line 35 of file BaseTestSuite.cs.
|
inlinestaticinherited |
Set the Client API Server URL to the configured API_URL.
Definition at line 235 of file BaseServerAPITestSuite.cs.
|
inlinevirtual |
Verify that doing a get for a resource with a malformed id returns a NotFound error.
Definition at line 121 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Definition at line 66 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Definition at line 72 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Definition at line 81 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Definition at line 131 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Verify that doing a get for a resource that doesn't exist returns a NotFound error.
Definition at line 109 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Definition at line 139 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Definition at line 149 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Verify that doing a PUT for a resource with a malformed id returns a NotFound error.
Reimplemented in AnalyzeReTesting.Tests.Model.TestSuite_LayerView_Base, and AnalyzeReTesting.Tests.Model.TestSuite_PortfolioView_Base.
Definition at line 175 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Definition at line 187 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Verify that doing a PUT for a resource that doesn't exist returns a NotFound error.
Definition at line 161 of file BaseAbstractResourceTestsSuite.cs.
|
inlinevirtual |
Definition at line 195 of file BaseAbstractResourceTestsSuite.cs.
|
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.
|
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.
|
staticinherited |
Shared instance of a class for generating random resources.
Definition at line 18 of file BaseClientTestSuite.cs.
|
staticinherited |
Shared instance of a class for generating reusable sample resources.
Definition at line 15 of file BaseClientTestSuite.cs.
|
staticgetsetinherited |
Set the AuthenticationToken to supply to the server before every test (if applicable).
Definition at line 32 of file BaseServerAPITestSuite.cs.
|
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.
|
getabstractprotected |
The ICollection object that can be used to retrieve resources of this type (as an alternative to the GetResourceList method.)
Definition at line 61 of file BaseAbstractResourceTestsSuite.cs.
|
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.
|
getprotected |
Whether resources of this type support the PUT method. Deriving class should override the below if the default behaviour isn't desired.
Definition at line 57 of file BaseAbstractResourceTestsSuite.cs.
|
getsetinherited |
Definition at line 20 of file BaseTestSuite.cs.