Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions CS/DevExpressBunit.Test/DevExpressBunit.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="bunit.web" Version="1.23.9" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="FluentAssertions" Version="7.0.0-alpha.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0-preview-23424-02" />
<PackageReference Include="xunit" Version="2.5.2-pre.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.2-pre.3">
<PackageReference Include="AngleSharp" Version="1.*" />
<PackageReference Include="bunit" Version="2.7.2" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="FluentAssertions" Version="8.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="10.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
7 changes: 1 addition & 6 deletions CS/DevExpressBunit.Test/DevExpressComponentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace DevExpressBunit.Test {
public static class BUnitTestContextExtensions {
public static void AddDevExpressBlazorTesting(this TestContext testContext) {
public static void AddDevExpressBlazorTesting(this BunitContext testContext) {
testContext.Services.AddSingleton<WeatherForecastService>();
testContext.Services.TryAddScoped<ScriptsProvider, ScriptsProvider>();
testContext.Services.TryAddScoped<LicenseRenderer, LicenseRenderer>();
Expand All @@ -32,11 +32,6 @@ public static void AddDevExpressBlazorTesting(this TestContext testContext) {
testContext.JSInterop.ConfigureJSInterop();
}

public static async Task WaitForAssertionAsync(this IRenderedFragmentBase renderedFragment, Action assertion, TimeSpan? timeout = null) {
using var waiter = new WaitForAssertionHelper(renderedFragment, assertion, timeout);
await waiter.WaitTask;
}

static void ConfigureJSInterop(this BunitJSInterop interop) {
interop.Mode = JSRuntimeMode.Loose;
var rootModule = interop.SetupModule("./_content/DevExpress.Blazor/dx-blazor.js");
Expand Down
6 changes: 3 additions & 3 deletions CS/DevExpressBunit.Test/GridApplyFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

namespace DevExpressBunit.Test {
public class GridApplyFilter : IDisposable {
public TestContext Context { get; }
public BunitContext Context { get; }
public GridApplyFilter() {
Context = new TestContext();
Context = new BunitContext();
Context.Services.AddOptions();
Context.AddDevExpressBlazorTesting();
}
[Fact]
public void CheckIfNodeClickAppliesFilter() {
var cut = Context.RenderComponent<Grid_ApplyFilter>();
var cut = Context.Render<Grid_ApplyFilter>();
var treeview = cut.FindComponent<DxTreeView>().Instance;
var grid = cut.FindComponent<DxGrid>().Instance;
cut.InvokeAsync(() => treeview.SelectNode(x => x.Text == "Filter by date"));
Expand Down
2 changes: 1 addition & 1 deletion CS/DxTestProject/DxTestProject.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down