OpenPetra
Free Administration Software for Non-Profits
Ict.Testing.NUnitTools.CommonNUnitFunctions Class Reference

a set of small helpfull routines to make testing something easier. More...

Static Public Member Functions

static void InitRootPath ()
 get the root path of this OpenPetra directory More...
 
static string LoadCSVFileToString (string fileName)
 load the csv file into a string More...
 
static void ResetDatabase ()
 Resets the data base to its initial value ... More...
 
static void LoadTestDataBase (string strSqlFilePathFromCSharpName, int ALedgerNumber=-1)
 Routine to load a test specific data base. More...
 
static int CreateNewLedger (DateTime? AStartDate=null, bool AWithILT=false)
 create a new ledger, with new ledgernumber More...
 
static string OpenPetraServerAdminConsole (string ACommand, string AParameters="")
 execute commands in the server admin console More...
 
static void StartOpenPetraServer (string AParameters="")
 start the OpenPetra server More...
 
static void nant (String argument, bool ignoreError)
 Routine to start nant ... More...
 
static void EnsureNullOrEmptyVerificationResult (TVerificationResultCollection AVerificationResult, string AMessage="")
 Checks that a TVerificationResultCollection is either null or that it doesn't contain any TVerificationResult items . If it isn't null and it contains items an Assert.Fail call is issued by this Method! More...
 
static void EnsureNullOrOnlyNonCriticalVerificationResults (TVerificationResultCollection AVerificationResult, string AMessage="")
 Checks that a TVerificationResultCollection is either null or that it doesn't contain any TVerificationResult items that are CriticalErrors. If it isn't null and it contains such items, an Assert.Fail call is issued by this Method! More...
 

Static Public Attributes

static string rootPath
 This is the central path of the complete tree More...
 

Detailed Description

a set of small helpfull routines to make testing something easier.

Member Function Documentation

◆ CreateNewLedger()

static int Ict.Testing.NUnitTools.CommonNUnitFunctions.CreateNewLedger ( DateTime?  AStartDate = null,
bool  AWithILT = false 
)
inlinestatic

create a new ledger, with new ledgernumber

Returns
ledgernumber of new ledger

◆ EnsureNullOrEmptyVerificationResult()

static void Ict.Testing.NUnitTools.CommonNUnitFunctions.EnsureNullOrEmptyVerificationResult ( TVerificationResultCollection  AVerificationResult,
string  AMessage = "" 
)
inlinestatic

Checks that a TVerificationResultCollection is either null or that it doesn't contain any TVerificationResult items . If it isn't null and it contains items an Assert.Fail call is issued by this Method!

Can be used for 'Guard Asserts' to check that the TVerificationResultCollection that is returned from server calls is null or empty.

Parameters
AVerificationResultTVerificationResultCollection reference (can be null!).
AMessageString to append before the Assert message that this Method produces (optional).

◆ EnsureNullOrOnlyNonCriticalVerificationResults()

static void Ict.Testing.NUnitTools.CommonNUnitFunctions.EnsureNullOrOnlyNonCriticalVerificationResults ( TVerificationResultCollection  AVerificationResult,
string  AMessage = "" 
)
inlinestatic

Checks that a TVerificationResultCollection is either null or that it doesn't contain any TVerificationResult items that are CriticalErrors. If it isn't null and it contains such items, an Assert.Fail call is issued by this Method!

Can be used for 'Guard Asserts' to check that the TVerificationResultCollection that is returned from server calls is null or holds only non-critical TVerificationResult items.

Parameters
AVerificationResultTVerificationResultCollection reference (can be null!).
AMessageString to append before the Assert message that this Method produces (optional).

◆ InitRootPath()

static void Ict.Testing.NUnitTools.CommonNUnitFunctions.InitRootPath ( )
inlinestatic

get the root path of this OpenPetra directory

◆ LoadCSVFileToString()

static string Ict.Testing.NUnitTools.CommonNUnitFunctions.LoadCSVFileToString ( string  fileName)
inlinestatic

load the csv file into a string

◆ LoadTestDataBase()

static void Ict.Testing.NUnitTools.CommonNUnitFunctions.LoadTestDataBase ( string  strSqlFilePathFromCSharpName,
int  ALedgerNumber = -1 
)
inlinestatic

Routine to load a test specific data base.

Parameters
strSqlFilePathFromCSharpNameA filename starting from the root. (csharp\ICT\Testing\...\filename.sql)
ALedgerNumberledger that we are using currently

◆ nant()

static void Ict.Testing.NUnitTools.CommonNUnitFunctions.nant ( String  argument,
bool  ignoreError 
)
inlinestatic

Routine to start nant ...

Parameters
argument
ignoreError

◆ OpenPetraServerAdminConsole()

static string Ict.Testing.NUnitTools.CommonNUnitFunctions.OpenPetraServerAdminConsole ( string  ACommand,
string  AParameters = "" 
)
inlinestatic

execute commands in the server admin console

◆ ResetDatabase()

static void Ict.Testing.NUnitTools.CommonNUnitFunctions.ResetDatabase ( )
inlinestatic

Resets the data base to its initial value ...

◆ StartOpenPetraServer()

static void Ict.Testing.NUnitTools.CommonNUnitFunctions.StartOpenPetraServer ( string  AParameters = "")
inlinestatic

start the OpenPetra server

Member Data Documentation

◆ rootPath

string Ict.Testing.NUnitTools.CommonNUnitFunctions.rootPath
static

This is the central path of the complete tree


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