C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeReTesting.Utilities.CleanUp Class Reference

Utilities for cleaning up the server. More...

Static Public Member Functions

static bool CheckServerIsClean (bool ignoreExceptions=false)
 Check all known server endpoints and determine whether there are any resources on the server.
 
static bool ForceCleanServer (bool ignoreExceptions=false, int? timeout=null)
 Invoke the DELETE method on the root of the server. Will wait for the DELETE to complete successfully for [timeout] seconds, then time out.
 
static bool TryDelete_Silent (IAPIResource item)
 Attempt to delete the resource, but throw no exceptions if it cannot be deleted.
 

Detailed Description

Utilities for cleaning up the server.

Definition at line 18 of file CleanUp.cs.

Member Function Documentation

◆ CheckServerIsClean()

static bool AnalyzeReTesting.Utilities.CleanUp.CheckServerIsClean ( bool  ignoreExceptions = false)
inlinestatic

Check all known server endpoints and determine whether there are any resources on the server.

Returns
True if the server is clean (contains no resources), false otherwise.

Definition at line 23 of file CleanUp.cs.

◆ ForceCleanServer()

static bool AnalyzeReTesting.Utilities.CleanUp.ForceCleanServer ( bool  ignoreExceptions = false,
int?  timeout = null 
)
inlinestatic

Invoke the DELETE method on the root of the server. Will wait for the DELETE to complete successfully for [timeout] seconds, then time out.

Parameters
ignoreExceptionsIF true, this method will not raise an assertion fail if the cleanup fails or times out.
timeoutThe amount of time (in milliseconds) to poll the server to cleanup before giving up.
Returns
True if the cleanup succeeded, false otherwise.

Definition at line 63 of file CleanUp.cs.

◆ TryDelete_Silent()

static bool AnalyzeReTesting.Utilities.CleanUp.TryDelete_Silent ( IAPIResource  item)
inlinestatic

Attempt to delete the resource, but throw no exceptions if it cannot be deleted.

Parameters
itemThe resource to delete.
Returns
True if the delete succeeded, false otherwise.

Definition at line 93 of file CleanUp.cs.


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