mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-14 04:58:33 +00:00
Slighly better SafeInvoke tests
This commit is contained in:
parent
e5ae4298ca
commit
873e02b175
1 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ namespace ICD.Common.Utils.Tests
|
||||||
public void SafeInvokeTest()
|
public void SafeInvokeTest()
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
ThreadingUtils.SafeInvoke(() => result = true);
|
ThreadingUtils.SafeInvoke(() => { ThreadingUtils.Sleep(100); result = true; });
|
||||||
|
|
||||||
Assert.IsFalse(result);
|
Assert.IsFalse(result);
|
||||||
ThreadingUtils.Sleep(1000);
|
ThreadingUtils.Sleep(1000);
|
||||||
|
|
@ -31,7 +31,7 @@ namespace ICD.Common.Utils.Tests
|
||||||
public void SafeInvokeParamTest()
|
public void SafeInvokeParamTest()
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
ThreadingUtils.SafeInvoke(p => result = p, true);
|
ThreadingUtils.SafeInvoke(p => { ThreadingUtils.Sleep(100); result = p; }, true);
|
||||||
|
|
||||||
Assert.IsFalse(result);
|
Assert.IsFalse(result);
|
||||||
ThreadingUtils.Sleep(1000);
|
ThreadingUtils.Sleep(1000);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue