Skip to content

Commit

Permalink
Add net462 target framework
Browse files Browse the repository at this point in the history
  • Loading branch information
heku committed Jul 8, 2024
1 parent d1bcdd6 commit d9f8396
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void GetNumberTaskAsync_is_completed_successfully_with_correct_result()
var proxy = this.CreateInterfaceProxy<IGetNumber>(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);

Check warning on line 27 in Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithReturn.cs

View workflow job for this annotation

GitHub Actions / build-test-and-push

Test methods should not use blocking task operations, as they can cause deadlocks. Use an async test method and await instead. (https://xunit.net/xunit.analyzers/rules/xUnit1031)

Check warning on line 27 in Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithReturn.cs

View workflow job for this annotation

GitHub Actions / build-test-and-push

Test methods should not use blocking task operations, as they can cause deadlocks. Use an async test method and await instead. (https://xunit.net/xunit.analyzers/rules/xUnit1031)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 42 in Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithWaitAndReturn.cs

View workflow job for this annotation

GitHub Actions / build-test-and-push

Test methods should not use blocking task operations, as they can cause deadlocks. Use an async test method and await instead. (https://xunit.net/xunit.analyzers/rules/xUnit1031)

Check warning on line 42 in Kunet.AsyncInterceptor.Tests/TestsFromStakx/GetNumberTaskAsyncWithWaitAndReturn.cs

View workflow job for this annotation

GitHub Actions / build-test-and-push

Test methods should not use blocking task operations, as they can cause deadlocks. Use an async test method and await instead. (https://xunit.net/xunit.analyzers/rules/xUnit1031)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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);

Check warning on line 48 in Kunet.AsyncInterceptor.Tests/TestsFromStakx/Infrastructure/ClockTaskFactoryTests.cs

View workflow job for this annotation

GitHub Actions / build-test-and-push

Test methods should not use blocking task operations, as they can cause deadlocks. Use an async test method and await instead. (https://xunit.net/xunit.analyzers/rules/xUnit1031)
}

Expand All @@ -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);

Check warning on line 59 in Kunet.AsyncInterceptor.Tests/TestsFromStakx/Infrastructure/ClockTaskFactoryTests.cs

View workflow job for this annotation

GitHub Actions / build-test-and-push

Test methods should not use blocking task operations, as they can cause deadlocks. Use an async test method and await instead. (https://xunit.net/xunit.analyzers/rules/xUnit1031)
}

Expand Down
2 changes: 1 addition & 1 deletion Kunet.AsyncInterceptor/Kunet.AsyncInterceptor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<LangVersion>latest</LangVersion>
<VersionPrefix>1.0.0</VersionPrefix>
<Authors>Heku</Authors>
Expand Down

0 comments on commit d9f8396

Please sign in to comment.