diff --git a/Kunet.AsyncInterceptor.Tests/Kunet.AsyncInterceptor.Tests.csproj b/Kunet.AsyncInterceptor.Tests/Kunet.AsyncInterceptor.Tests.csproj index 9b83696..4bc98df 100644 --- a/Kunet.AsyncInterceptor.Tests/Kunet.AsyncInterceptor.Tests.csproj +++ b/Kunet.AsyncInterceptor.Tests/Kunet.AsyncInterceptor.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net462;net6.0 enable latest false diff --git a/Kunet.AsyncInterceptor.Tests/TestsFromStakx/DoTaskAsyncWithWait.cs b/Kunet.AsyncInterceptor.Tests/TestsFromStakx/DoTaskAsyncWithWait.cs index 8ba5e0b..af5f292 100644 --- a/Kunet.AsyncInterceptor.Tests/TestsFromStakx/DoTaskAsyncWithWait.cs +++ b/Kunet.AsyncInterceptor.Tests/TestsFromStakx/DoTaskAsyncWithWait.cs @@ -25,7 +25,7 @@ public void DoTaskAsync_that_completes_at_time_1_is_successfully_completed_at_ti this.Clock.AdvanceTo(1); - Assert.True(task.IsCompletedSuccessfully); + Assert.True(task.IsCompleted && task.Status == TaskStatus.RanToCompletion); // IsCompletedSuccessfully } } } \ No newline at end of file diff --git a/Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithReturn.cs b/Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithReturn.cs index 74bd206..ca32691 100644 --- a/Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithReturn.cs +++ b/Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithReturn.cs @@ -23,7 +23,7 @@ public void GetNumberTaskAsync_is_completed_successfully_with_correct_result() var proxy = this.CreateInterfaceProxy(new Return(42)); var task = proxy.GetNumberTaskAsync(); - Assert.True(task.IsCompletedSuccessfully); + Assert.True(task.IsCompleted && task.Status == TaskStatus.RanToCompletion); // IsCompletedSuccessfully Assert.Equal(42, task.Result); } } diff --git a/Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithWaitAndReturn.cs b/Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithWaitAndReturn.cs index 174eb13..77958b6 100644 --- a/Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithWaitAndReturn.cs +++ b/Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithWaitAndReturn.cs @@ -38,7 +38,7 @@ public void GetNumberTaskAsync_that_completes_at_time_1_completes_successfully_w this.Clock.AdvanceTo(1); - Assert.True(task.IsCompletedSuccessfully); + Assert.True(task.IsCompleted && task.Status == TaskStatus.RanToCompletion); // IsCompletedSuccessfully Assert.Equal(42, task.Result); } } diff --git a/Kunet.AsyncInterceptor.Tests/TestsFromStakx/Infrastructure/ClockTaskFactoryTests.cs b/Kunet.AsyncInterceptor.Tests/TestsFromStakx/Infrastructure/ClockTaskFactoryTests.cs index b5546dc..19e981e 100644 --- a/Kunet.AsyncInterceptor.Tests/TestsFromStakx/Infrastructure/ClockTaskFactoryTests.cs +++ b/Kunet.AsyncInterceptor.Tests/TestsFromStakx/Infrastructure/ClockTaskFactoryTests.cs @@ -23,7 +23,7 @@ public void CreateCompletingTask_task_completes_successfully_when_clock_reaches_ var task = clock.TaskFactory.CreateCompletingTask(1); clock.AdvanceTo(1); - Assert.True(task.IsCompletedSuccessfully); + Assert.True(task.IsCompleted && task.Status == TaskStatus.RanToCompletion); // IsCompletedSuccessfully } [Fact] @@ -33,7 +33,7 @@ public void CreateCompletingTask_task_completes_successfully_when_clock_reaches_ var task = clock.TaskFactory.CreateCompletingTask(1); clock.AdvanceTo(10); - Assert.True(task.IsCompletedSuccessfully); + Assert.True(task.IsCompleted && task.Status == TaskStatus.RanToCompletion); // IsCompletedSuccessfully } [Fact] @@ -43,7 +43,8 @@ public void CreateCompletingTask_task_completes_successfully_with_correct_result var task = clock.TaskFactory.CreateCompletingTask(1, "42"); clock.AdvanceTo(1); - Assert.True(task.IsCompletedSuccessfully); + Assert.True(task.IsCompleted && task.Status == TaskStatus.RanToCompletion); // IsCompletedSuccessfully + Assert.Equal("42", task.Result); } @@ -54,7 +55,7 @@ public void CreateCompletingTask_task_completes_successfully_with_correct_result var task = clock.TaskFactory.CreateCompletingTask(1, "42"); clock.AdvanceTo(10); - Assert.True(task.IsCompletedSuccessfully); + Assert.True(task.IsCompleted && task.Status == TaskStatus.RanToCompletion); // IsCompletedSuccessfully Assert.Equal("42", task.Result); } diff --git a/Kunet.AsyncInterceptor/Kunet.AsyncInterceptor.csproj b/Kunet.AsyncInterceptor/Kunet.AsyncInterceptor.csproj index d8049ec..08d13ed 100644 --- a/Kunet.AsyncInterceptor/Kunet.AsyncInterceptor.csproj +++ b/Kunet.AsyncInterceptor/Kunet.AsyncInterceptor.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.0;net462 latest 1.0.0 Heku