File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
test/SeqCli.EndToEnd/License Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . IO ;
3+ using System . Threading . Tasks ;
4+ using Seq . Api ;
5+ using SeqCli . EndToEnd . Support ;
6+ using Serilog ;
7+ using Xunit ;
8+
9+ namespace SeqCli . EndToEnd . License ;
10+
11+ public class LicenseShowTestCase : ICliTestCase
12+ {
13+ readonly TestDataFolder _testDataFolder ;
14+
15+ public LicenseShowTestCase ( TestDataFolder testDataFolder )
16+ {
17+ _testDataFolder = testDataFolder ;
18+ }
19+
20+ public Task ExecuteAsync ( SeqConnection connection , ILogger logger , CliCommandRunner runner )
21+ {
22+
23+ // test empty text output if no license is applied
24+ runner . Exec ( "license show" ) ;
25+ Assert . Equal (
26+ "" ,
27+ runner . LastRunProcess . Output . Trim ( ) ) ;
28+
29+ // test json output if no license is applied
30+ runner . Exec ( "license show --json" ) ;
31+ Assert . Contains (
32+ "You're using the free Individual license." ,
33+ runner . LastRunProcess . Output . Trim ( ) ) ;
34+ return Task . CompletedTask ;
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments