Skip to content

Commit 0cb48d2

Browse files
committed
Add Tests for using Plotly.NET in a strong named environment (#371)
1 parent 46c6937 commit 0cb48d2

File tree

6 files changed

+64
-2
lines changed

6 files changed

+64
-2
lines changed

Plotly.NET.sln

+10-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60
77
ProjectSection(SolutionItems) = preProject
88
.editorconfig = .editorconfig
99
.config\dotnet-tools.json = .config\dotnet-tools.json
10-
global.json = global.json
1110
key.snk = key.snk
1211
LICENSE = LICENSE
1312
README.md = README.md
@@ -24,6 +23,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{7C6D08E7
2423
ProjectSection(SolutionItems) = preProject
2524
build.cmd = build.cmd
2625
build.sh = build.sh
26+
global.json = global.json
2727
EndProjectSection
2828
EndProject
2929
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Plotly.NET", "src\Plotly.NET\Plotly.NET.fsproj", "{DFAC135B-36B8-4347-B1DD-B5E0144610C2}"
@@ -156,6 +156,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plotly.NET.CSharp.Tests", "
156156
EndProject
157157
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plotly.NET.Tests.CSharpInteroperability", "tests\Plotly.NET.Tests.CSharpInteroperability\Plotly.NET.Tests.CSharpInteroperability.csproj", "{64022D22-EB9A-4AE3-A0E6-BFA41E8B18CB}"
158158
EndProject
159+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Plotly.NET.Tests.StrongName", "tests\Plotly.NET.Tests.StrongName\Plotly.NET.Tests.StrongName.fsproj", "{E923A457-A6D3-4614-A8A9-287E4A4797EF}"
160+
EndProject
159161
Global
160162
GlobalSection(SolutionConfigurationPlatforms) = preSolution
161163
Debug|Any CPU = Debug|Any CPU
@@ -229,6 +231,12 @@ Global
229231
{64022D22-EB9A-4AE3-A0E6-BFA41E8B18CB}.Dotnet|Any CPU.Build.0 = Debug|Any CPU
230232
{64022D22-EB9A-4AE3-A0E6-BFA41E8B18CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
231233
{64022D22-EB9A-4AE3-A0E6-BFA41E8B18CB}.Release|Any CPU.Build.0 = Release|Any CPU
234+
{E923A457-A6D3-4614-A8A9-287E4A4797EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
235+
{E923A457-A6D3-4614-A8A9-287E4A4797EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
236+
{E923A457-A6D3-4614-A8A9-287E4A4797EF}.Dotnet|Any CPU.ActiveCfg = Debug|Any CPU
237+
{E923A457-A6D3-4614-A8A9-287E4A4797EF}.Dotnet|Any CPU.Build.0 = Debug|Any CPU
238+
{E923A457-A6D3-4614-A8A9-287E4A4797EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
239+
{E923A457-A6D3-4614-A8A9-287E4A4797EF}.Release|Any CPU.Build.0 = Release|Any CPU
232240
EndGlobalSection
233241
GlobalSection(SolutionProperties) = preSolution
234242
HideSolutionNode = FALSE
@@ -248,6 +256,7 @@ Global
248256
{F944FE69-F4A5-4B48-8E4D-BE4B61E92B26} = {0E87E47E-9EDC-4525-AF72-F0E139D54236}
249257
{4C24BA53-F41C-4110-AD7A-28143DCF671E} = {EAE25A1F-86FC-426B-803F-1006D1AD06A8}
250258
{64022D22-EB9A-4AE3-A0E6-BFA41E8B18CB} = {EAE25A1F-86FC-426B-803F-1006D1AD06A8}
259+
{E923A457-A6D3-4614-A8A9-287E4A4797EF} = {EAE25A1F-86FC-426B-803F-1006D1AD06A8}
251260
EndGlobalSection
252261
GlobalSection(ExtensibilityGlobals) = postSolution
253262
SolutionGuid = {7177F1E1-341C-48AB-9864-6B525FFF7633}

build.cmd

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
@echo off
2-
cls
32

43
dotnet run --project ./build/build.fsproj %*

build/ProjectInfo.fs

+2
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ let CoreTestProject = ProjectInfo.create("Plotly.NET.Tests", "tests/Plotly.NET.T
6666
let ImageExportTestProject = ProjectInfo.create("Plotly.NET.ImageExport.Tests", "tests/Plotly.NET.ImageExport.Tests/Plotly.NET.ImageExport.Tests.fsproj")
6767
let CSharpInteroperabilityTestProject = ProjectInfo.create("Plotly.NET.Tests.CSharpInteroperability", "tests/Plotly.NET.Tests.CSharpInteroperability/Plotly.NET.Tests.CSharpInteroperability.csproj")
6868
let CSharpTestProject = ProjectInfo.create("Plotly.NET.CSharp.Tests", "tests/Plotly.NET.CSharp.Tests/Plotly.NET.CSharp.Tests.csproj")
69+
let StrongNameTestProject = ProjectInfo.create("Plotly.NET.Tests.StrongName", "tests/Plotly.NET.Tests.StrongName/Plotly.NET.Tests.StrongName.fsproj")
6970

7071
/// contains project info about all test projects
7172
let testProjects =
7273
[
7374
CoreTestProject
7475
ImageExportTestProject
7576
CSharpTestProject
77+
StrongNameTestProject
7678
]
7779

7880
let CoreProject = ProjectInfo.create("Plotly.NET", "src/Plotly.NET/Plotly.NET.fsproj", "src/Plotly.NET/RELEASE_NOTES.md")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net48</TargetFramework>
5+
6+
<IsPackable>false</IsPackable>
7+
<GenerateProgramFile>false</GenerateProgramFile>
8+
<IsTestProject>true</IsTestProject>
9+
<SignAssembly>true</SignAssembly>
10+
<AssemblyOriginatorKeyFile>../../key.snk</AssemblyOriginatorKeyFile>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<Compile Include="Tests.fs" />
15+
<Compile Include="Program.fs" />
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
20+
<PackageReference Include="xunit" Version="2.4.2" />
21+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
22+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
23+
<PrivateAssets>all</PrivateAssets>
24+
</PackageReference>
25+
<PackageReference Include="coverlet.collector" Version="3.2.0">
26+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
27+
<PrivateAssets>all</PrivateAssets>
28+
</PackageReference>
29+
</ItemGroup>
30+
31+
<ItemGroup>
32+
<ProjectReference Include="..\..\src\Plotly.NET\Plotly.NET.fsproj" />
33+
</ItemGroup>
34+
35+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Program
2+
3+
let [<EntryPoint>] main _ = 0
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module Tests
2+
3+
open System
4+
open Xunit
5+
6+
open Plotly.NET
7+
open Giraffe.ViewEngine
8+
9+
[<Fact>]
10+
let ``Can use with Giraffe`` () =
11+
Chart.Point([1,2])
12+
|> Chart.withDescription [
13+
div [] [ str "Hello World" ]
14+
]

0 commit comments

Comments
 (0)