API test system assertion utilities.
More...
|
static EventHandler< T > | CallsBack< T > (string eventName, string eventMsg=null) |
| Asserts that the event receives a callback... eventually. Add the eventhandler returned by this method to the relevant event. This does not assert that the callback happens under that event's intended circumstances. Add another event handler to assert specific circumstance requirements. More...
|
|
static bool | CloseTo (double a, double b, string err=null, string success=null, double delta=double.Epsilon) |
|
static bool | CloseTo (float a, float b, string err=null, string success=null, float delta=float.Epsilon) |
|
static bool | CloseTo (float3 a, float3 b, string err=null, string success=null, float delta=float.Epsilon) |
|
static bool | Equal< T > (T obj1, T obj2, string err=null, string success=null) |
|
static bool | Errorful< T > (Action tryThis, string err=null, string success=null) |
|
static bool | Errorless (Action tryThis, string err=null, string success=null) |
|
static void | Fail (string msg=null) |
|
static void | Log (string msg, string end="\n") |
| Log a message to the test log. More...
|
|
static bool | NotNull< T > (T obj, string err=null, string success=null) |
|
static void | Pass (string msg=null) |
|
static void | Warn (string msg=null) |
|
API test system assertion utilities.
◆ CallsBack< T >()
static EventHandler<T> TechbloxModdingAPI.Tests.Assert.CallsBack< T > |
( |
string |
eventName, |
|
|
string |
eventMsg = null |
|
) |
| |
|
inlinestatic |
Asserts that the event receives a callback... eventually. Add the eventhandler returned by this method to the relevant event. This does not assert that the callback happens under that event's intended circumstances. Add another event handler to assert specific circumstance requirements.
- Returns
- The callback event handler.
- Parameters
-
eventName | Event name. |
eventMsg | Event error message. |
- Template Parameters
-
T | The event handler callback argument object. |
◆ CallsComplete()
static void TechbloxModdingAPI.Tests.Assert.CallsComplete |
( |
| ) |
|
|
inlinestaticpackage |
◆ CloseLog()
static void TechbloxModdingAPI.Tests.Assert.CloseLog |
( |
| ) |
|
|
inlinestaticpackage |
◆ CloseTo() [1/3]
static bool TechbloxModdingAPI.Tests.Assert.CloseTo |
( |
double |
a, |
|
|
double |
b, |
|
|
string |
err = null , |
|
|
string |
success = null , |
|
|
double |
delta = double.Epsilon |
|
) |
| |
|
inlinestatic |
◆ CloseTo() [2/3]
static bool TechbloxModdingAPI.Tests.Assert.CloseTo |
( |
float |
a, |
|
|
float |
b, |
|
|
string |
err = null , |
|
|
string |
success = null , |
|
|
float |
delta = float.Epsilon |
|
) |
| |
|
inlinestatic |
◆ CloseTo() [3/3]
static bool TechbloxModdingAPI.Tests.Assert.CloseTo |
( |
float3 |
a, |
|
|
float3 |
b, |
|
|
string |
err = null , |
|
|
string |
success = null , |
|
|
float |
delta = float.Epsilon |
|
) |
| |
|
inlinestatic |
◆ Equal< T >()
static bool TechbloxModdingAPI.Tests.Assert.Equal< T > |
( |
T |
obj1, |
|
|
T |
obj2, |
|
|
string |
err = null , |
|
|
string |
success = null |
|
) |
| |
|
inlinestatic |
◆ Errorful< T >()
static bool TechbloxModdingAPI.Tests.Assert.Errorful< T > |
( |
Action |
tryThis, |
|
|
string |
err = null , |
|
|
string |
success = null |
|
) |
| |
|
inlinestatic |
◆ Errorless()
static bool TechbloxModdingAPI.Tests.Assert.Errorless |
( |
Action |
tryThis, |
|
|
string |
err = null , |
|
|
string |
success = null |
|
) |
| |
|
inlinestatic |
◆ Fail()
static void TechbloxModdingAPI.Tests.Assert.Fail |
( |
string |
msg = null | ) |
|
|
inlinestatic |
◆ Log()
static void TechbloxModdingAPI.Tests.Assert.Log |
( |
string |
msg, |
|
|
string |
end = "\n" |
|
) |
| |
|
inlinestatic |
Log a message to the test log.
- Parameters
-
msg | Message. |
end | Message ending. |
◆ NotNull< T >()
static bool TechbloxModdingAPI.Tests.Assert.NotNull< T > |
( |
T |
obj, |
|
|
string |
err = null , |
|
|
string |
success = null |
|
) |
| |
|
inlinestatic |
◆ Pass()
static void TechbloxModdingAPI.Tests.Assert.Pass |
( |
string |
msg = null | ) |
|
|
inlinestatic |
◆ Warn()
static void TechbloxModdingAPI.Tests.Assert.Warn |
( |
string |
msg = null | ) |
|
|
inlinestatic |
The documentation for this class was generated from the following file: