-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #487 from Blazor-Diagrams/develop
Version 3.0.3
- Loading branch information
Showing
23 changed files
with
175 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,47 @@ | ||
<Project> | ||
|
||
<ItemGroup> | ||
<PackageVersion Include="SvgPathProperties" Version="1.1.2" /> | ||
<PackageVersion Include="System.Net.Http.Json" Version="8.0.0" /> | ||
<PackageVersion Include="GraphShape" Version="1.2.1" /> | ||
<PackageVersion Include="MatBlazor" Version="2.10.0" /> | ||
<PackageVersion Include="bunit" Version="1.25.3" /> | ||
<PackageVersion Include="FluentAssertions" Version="6.12.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||
<PackageVersion Include="xunit" Version="2.6.3" /> | ||
<PackageVersion Include="Moq" Version="[4.18.4]" /> | ||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.5"/> | ||
<PackageVersion Include="coverlet.collector" Version="6.0.0"/> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="SvgPathProperties" Version="1.1.2" /> | ||
<PackageVersion Include="System.Net.Http" Version="4.3.4" /> | ||
<PackageVersion Include="System.Net.Http.Json" Version="9.0.0" /> | ||
<PackageVersion Include="GraphShape" Version="1.2.1" /> | ||
<PackageVersion Include="MatBlazor" Version="2.10.0" /> | ||
<PackageVersion Include="bunit" Version="1.36.0" /> | ||
<PackageVersion Include="FluentAssertions" Version="6.12.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" /> | ||
<PackageVersion Include="xunit" Version="2.6.3" /> | ||
<PackageVersion Include="Moq" Version="[4.18.4]" /> | ||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.5" /> | ||
<PackageVersion Include="coverlet.collector" Version="6.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'"> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="6.0.25" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="6.0.25" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.25" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.25" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'"> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="6.0.25" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="6.0.25" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.25" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.25" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'"> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="7.0.14" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="7.0.14" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.14" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.14" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'"> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="7.0.14" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="7.0.14" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.14" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.14" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="[8, 9.0.0)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="[8, 9.0.0)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="[8,9.0.0)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="[8,9.0.0)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'"> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="[9, 10.0.0)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="[9, 10.0.0)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="[9, 10.0.0)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="[9, 10.0.0)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components" Version="[8, 9.0.0)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="[8, 9.0.0)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="[8,9.0.0)" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="[8,9.0.0)" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<TargetFrameworks>net8.0;net7.0;net6.0;</TargetFrameworks> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;</TargetFrameworks> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/Blazor.Diagrams.Tests/Components/DiagramCanvasTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Blazor.Diagrams.Components; | ||
using Blazor.Diagrams.Core.Geometry; | ||
using Bunit; | ||
using Xunit; | ||
|
||
namespace Blazor.Diagrams.Tests.Components | ||
{ | ||
public class DiagramCanvasTests | ||
{ | ||
[Fact] | ||
public void Behavior_WhenDisposing_ShouldUnsubscribeToResizes() | ||
{ | ||
// Arrange | ||
JSRuntimeInvocationHandler call; | ||
using (var ctx = new TestContext()) | ||
{ | ||
ctx.JSInterop.Setup<Rectangle>("ZBlazorDiagrams.getBoundingClientRect", _ => true); | ||
call = ctx.JSInterop.SetupVoid("ZBlazorDiagrams.unobserve", _ => true).SetVoidResult(); | ||
|
||
// Act | ||
var cut = ctx.RenderComponent<DiagramCanvas>(p => p.Add(n => n.BlazorDiagram, new BlazorDiagram())); | ||
} | ||
|
||
// Assert | ||
call.VerifyInvoke("ZBlazorDiagrams.unobserve", calledTimes: 1); | ||
} | ||
} | ||
} |
Oops, something went wrong.