mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-24 08:06:28 +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();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|