Skip to content

Commit 8e85ffc

Browse files
committed
Add test for the --include-version option
1 parent ad81dfa commit 8e85ffc

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tests/nugraph.Tests/NugraphTests.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,37 @@ class Serilog root
107107
""");
108108
}
109109

110+
[Test]
111+
[Arguments("--include-version")]
112+
[Arguments("-s")]
113+
public async Task Package_Serilog_401_net60_IncludeVersion(string option)
114+
{
115+
var result = await nugraph.RunAsync(["Serilog@4.0.1", "--framework", "net6.0", option]);
116+
117+
result.Should().Match(stdOutPattern: "https://mermaid.live/view#pako:*", stdErrPattern: """
118+
Generating dependency graph for Serilog 4.0.1
119+
Generating dependency graph for Serilog 4.0.1 (net6.0)
120+
""")
121+
.And.UrlHasDiagram("""
122+
---
123+
title: Dependency graph of Serilog 4.0.1 (net6.0)
124+
---
125+
126+
%% Generated by https://github.com/0xced/nugraph
127+
128+
graph LR
129+
130+
classDef root stroke-width:4px
131+
classDef default fill:aquamarine,stroke:#009061,color:#333333
132+
133+
Serilog{{Serilog#64;4.0.1}}
134+
135+
class Serilog root
136+
class Serilog default
137+
click Serilog "https://www.nuget.org/packages/Serilog/4.0.1" "Serilog 4.0.1"
138+
""");
139+
}
140+
110141
[Test]
111142
public async Task Package_DockerRunner_MermaidSvg()
112143
{

0 commit comments

Comments
 (0)