@@ -30,24 +30,14 @@ public ITestOutputHelper Output
30
30
31
31
[ ConditionalTheory ]
32
32
[ SkipOnHelix ( "Cert failure, https://github.com/dotnet/aspnetcore/issues/28090" , Queues = "All.OSX;" + HelixConstants . Windows10Arm64 + HelixConstants . DebianArm64 ) ]
33
- [ InlineData ( true , false ) ]
34
- [ InlineData ( true , true ) ]
35
- [ InlineData ( false , false ) ]
36
- [ InlineData ( false , true ) ]
37
- public async Task BlazorWebTemplate_NoAuth ( bool useProgramMain , bool noHttps )
33
+ [ MemberData ( nameof ( ArgsData ) ) ]
34
+ public async Task BlazorWebTemplate_NoAuth ( string [ ] args )
38
35
{
39
36
var project = await ProjectFactory . CreateProject ( Output ) ;
40
37
41
- var args = useProgramMain
42
- ? noHttps
43
- ? new [ ] { ArgConstants . UseProgramMain , ArgConstants . NoHttps }
44
- : new [ ] { ArgConstants . UseProgramMain }
45
- : noHttps
46
- ? new [ ] { ArgConstants . NoHttps }
47
- : null ;
48
38
await project . RunDotNetNewAsync ( "blazor" , args : args ) ;
49
39
50
- var expectedLaunchProfileNames = noHttps
40
+ var expectedLaunchProfileNames = args . Contains ( ArgConstants . NoHttps )
51
41
? new [ ] { "http" , "IIS Express" }
52
42
: new [ ] { "http" , "https" , "IIS Express" } ;
53
43
await project . VerifyLaunchSettings ( expectedLaunchProfileNames ) ;
@@ -79,6 +69,14 @@ public async Task BlazorWebTemplate_NoAuth(bool useProgramMain, bool noHttps)
79
69
}
80
70
} ;
81
71
72
+ if ( args . Contains ( ArgConstants . UseServer ) )
73
+ {
74
+ pages . Add ( new Page
75
+ {
76
+ Url = BlazorTemplatePages . Counter ,
77
+ } ) ;
78
+ }
79
+
82
80
using ( var aspNetProcess = project . StartBuiltProjectAsync ( ) )
83
81
{
84
82
Assert . False (
@@ -98,6 +96,18 @@ public async Task BlazorWebTemplate_NoAuth(bool useProgramMain, bool noHttps)
98
96
}
99
97
}
100
98
99
+ public static TheoryData < string [ ] > ArgsData ( ) => new TheoryData < string [ ] >
100
+ {
101
+ new string [ 0 ] ,
102
+ new [ ] { ArgConstants . UseProgramMain } ,
103
+ new [ ] { ArgConstants . NoHttps } ,
104
+ new [ ] { ArgConstants . UseProgramMain , ArgConstants . NoHttps } ,
105
+ new [ ] { ArgConstants . UseServer } ,
106
+ new [ ] { ArgConstants . UseServer , ArgConstants . UseProgramMain } ,
107
+ new [ ] { ArgConstants . UseServer , ArgConstants . NoHttps } ,
108
+ new [ ] { ArgConstants . UseServer , ArgConstants . UseProgramMain , ArgConstants . NoHttps }
109
+ } ;
110
+
101
111
private string ReadFile ( string basePath , string path )
102
112
{
103
113
var fullPath = Path . Combine ( basePath , path ) ;
@@ -111,5 +121,6 @@ private class BlazorTemplatePages
111
121
{
112
122
internal static readonly string Index = "" ;
113
123
internal static readonly string FetchData = "showdata" ;
114
- }
124
+ internal static readonly string Counter = "counter" ;
125
+ }
115
126
}
0 commit comments