mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-15 22:56:37 +01:00
22 lines
567 B
C#
22 lines
567 B
C#
|
using NUnit.Framework;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using TINK.ViewModel;
|
|||
|
|
|||
|
namespace TestTINKLib.Fixtures.ObjectTests
|
|||
|
{
|
|||
|
[TestFixture]
|
|||
|
public class TestPollingUpdateTask
|
|||
|
{
|
|||
|
[Test]
|
|||
|
public void TestTerminateRepeated()
|
|||
|
{
|
|||
|
var l_oTaks = new PollingUpdateTask(() => "Test", async () => await Task.Delay(1000), new System.TimeSpan(0, 0, 2));
|
|||
|
|
|||
|
l_oTaks.Terminate().Wait();
|
|||
|
|
|||
|
// Verify that calling terminate twice does not lead to hang of call.
|
|||
|
l_oTaks.Terminate().Wait();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|