sharee.bike-App/TestTINKLib/Fixtures/ObjectTests/TestPollingUpdateTask.cs
2021-07-12 21:31:46 +02:00

21 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();
}
}
}