CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Test.TestResults Class Reference

Static dictionary-like class that offers similar functionality to GlobalContext This is used in tests to record the completion of operations, for testing that the operation occurred More...

Static Public Member Functions

static void Add (string key, string value)
 Add an item to the test results, to indicate an outcome of a particular operation More...
 
static void AddOrOverwrite (string key, string value)
 Overwrite an item in the test results, to indicate an outcome of a particular operation More...
 
static string GetResult (string key)
 Get a result of an operation from the underlying results dictionary More...
 
static bool ContainsResult (string key)
 Get the existence of a result of an operation from the underlying results dictionary More...
 
static void Reinitialise ()
 Reinitialise the dictionary, clearing any existing results, ready for the next test More...
 

Detailed Description

Static dictionary-like class that offers similar functionality to GlobalContext This is used in tests to record the completion of operations, for testing that the operation occurred

Definition at line 20 of file TestResults.cs.

Member Function Documentation

◆ Add()

static void Csla.Test.TestResults.Add ( string  key,
string  value 
)
static

Add an item to the test results, to indicate an outcome of a particular operation

Parameters
keyThe key by which the operation is recognised
valueThe outcome recorded against the operation

Definition at line 29 of file TestResults.cs.

◆ AddOrOverwrite()

static void Csla.Test.TestResults.AddOrOverwrite ( string  key,
string  value 
)
static

Overwrite an item in the test results, to indicate an outcome of a particular operation

Parameters
keyThe key by which the operation is recognised
valueThe outcome recorded against the operation

Definition at line 39 of file TestResults.cs.

◆ ContainsResult()

static bool Csla.Test.TestResults.ContainsResult ( string  key)
static

Get the existence of a result of an operation from the underlying results dictionary

Parameters
keyThe key by which the operation is known
Returns
Whether the key is present in the dictionary of results

Definition at line 61 of file TestResults.cs.

◆ GetResult()

static string Csla.Test.TestResults.GetResult ( string  key)
static

Get a result of an operation from the underlying results dictionary

Parameters
keyThe key by which the operation is known
Returns
The value recorded against the operation, or an empty string if no result is found

Definition at line 49 of file TestResults.cs.

◆ Reinitialise()

static void Csla.Test.TestResults.Reinitialise ( )
static

Reinitialise the dictionary, clearing any existing results, ready for the next test

Definition at line 69 of file TestResults.cs.