128 references to Test
Microsoft.AspNetCore.App.Analyzers.Test (128)
RouteEmbeddedLanguage\RoutePatternParserTests_BasicTests.cs (53)
14Test(@"""""", @"<Tree> 25Test(@"""hello""", @"<Tree> 41Test(@"""hel?lo""", @"<Tree> 60Test(@"""hello/world""", @"<Tree> 84Test(@"""{a}/{a}""", @"<Tree> 121Test(@"""{a}/{b}""", @"<Tree> 156Test(@"""{*a}/""", @"<Tree> 184Test(@"""{*a}/{b}""", @"<Tree> 225Test(@"""{*a?}""", @"<Tree> 256Test(@"""a{*a}""", @"<Tree> 287Test(@"""hello.world""", @"<Tree> 303Test(@"""{id}""", @"<Tree> 325Test(@"""{id:foo}""", @"<Tree> 355Test(@"""{id=Home}""", @"<Tree> 381Test(@"""{id=Home=Controller:int()}""", @"<Tree> 407Test(@"""{id:foo(wee)}""", @"<Tree> 442Test(@"""{id:foo()}""", @"<Tree> 477Test(@"""{id?}""", @"<Tree> 502Test(@"""{id=Home}""", @"<Tree> 528Test(@"""{id=Home?}""", @"<Tree> 560Test(@"""{id?}}}""", @"<Tree> 585Test(@"""a{foob{bar}c""", @"<Tree> 616Test(@"""a{foo}b{bar}c""", @"<Tree> 655Test(@"""{a}{b}""", @"<Tree> 688Test(@"""{a{b}""", @"<Tree> 713Test(@"""{a/{b}""", @"<Tree> 738Test(@"""{id:foo?}""", @"<Tree> 771Test(@"""{id:foo:bar}""", @"<Tree> 808Test(@"""{id:foo(hi""", @"<Tree> 841Test(@"""{id:foo(hi}""", @"<Tree> 871Test(@"""{id:foo(hi)bar}""", @"<Tree> 909Test(@"""{*id}""", @"<Tree> 934Test(@"""{**id}""", @"<Tree> 959Test(@"""{}""", @"<Tree> 982Test(@"""{?}""", @"<Tree> 1008Test(@"""{*}""", @"<Tree> 1034Test(@"""{**}""", @"<Tree> 1060Test(@"""{**:int}""", @"<Tree> 1085Test(@"""{ssn:regex(^\\d{{3}}-\\d{{2}}-\\d{{4}}$)}""", @"<Tree> 1120Test(@"""{ssn:regex(^\\d{{3}}-\\d{{2}}-\\d{{4}""", @"<Tree> 1150Test(@"""{ssn:regex(^\\d{3}})}""", @"<Tree> 1188Test(@"""{3}}-\\d{{2}}-\\d{{4}""", @"<Tree> 1213Test(@"""-\\d{{2}}-\\d{{4}""", @"<Tree> 1232Test(@"""{{2}}""", @"<Tree> 1248Test(@"""{2}}""", @"<Tree> 1274Test(@"""{p1}{p2?}""", @"<Tree> 1310Test(@"""{p1}-{p2?}""", @"<Tree> 1349Test(@"""{:hi}""", @"<Tree> 1371Test(@"""{**:hi}""", @"<Tree> 1396Test(@"""~""", @"<Tree> 1415Test(@"""~~""", @"<Tree> 1434Test(@"""~/""", @"<Tree> 1453Test(@"""~{id}""", @"<Tree>
RouteEmbeddedLanguage\RoutePatternParserTests_ComponentsTests.cs (12)
16Test(@"""{p1?}/{p2?}/{p3?}""", @"<Tree> 73Test(@"""{*p}""", @"<Tree> 98Test(@"""awesome/wow/{*p}""", @"<Tree> 139Test(@"""awesome/{p1}/{*p2}""", @"<Tree> 189var tree = Test(@"""" + template + @"""", routePatternOptions: RoutePatternOptions.ComponentsRoute, allowDiagnosticsMismatch: true); 196Test(@"""/test/{a?}/test""", @"<Tree> 240Test(@"""/test/{a?}/{b}""", @"<Tree> 289Test(@"""/test/{a}/{**b}""", @"<Tree> 338Test(@"""/test/{*a}/{b}""", @"<Tree> 390Test(@"""/test/{a?bc}/{b}""", @"<Tree> 439Test(@"""{id=Home}""", @"<Tree> 465Test(@"""{p1}.{p2?}""", @"<Tree>
RouteEmbeddedLanguage\RoutePatternParserTests_ConformanceTests.cs (45)
14Test(@"""cool""", @"<Tree> 30Test(@"""{p}""", @"<Tree> 52Test(@"""{p?}""", @"<Tree> 77Test(@"""cool/awesome/super""", @"<Tree> 109Test(@"""{p1}/{p2}/{*p3}""", @"<Tree> 160Test(@"""cool-{p1}""", @"<Tree> 185Test(@"""{p1}-cool""", @"<Tree> 210Test(@"""{p1}-cool-{p2}""", @"<Tree> 243Test(@"""cool-{p1}-awesome""", @"<Tree> 271Test(@"""{p1}.{p2?}""", @"<Tree> 307Test(@"""{p1}.{p2}""", @"<Tree> 340Test(@"""{p1}.{p2}.{p3?}""", @"<Tree> 387Test(@"""{p1}.{p2}.{p3}""", @"<Tree> 431Test(@"""{p1}.{p2?}/{p3}""", @"<Tree> 480Test(@"""{p1}/{p2}.{p3?}""", @"<Tree> 529Test(@"""{p2}/.{p3?}""", @"<Tree> 575var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 589var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 598var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 613var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 626var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 633var tree = Test(@"""{Controller}.mvc/{id}/{controller}"""); 646var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 654var tree = Test(@"""123{a}abc{*moo}"""); 661var tree = Test(@"""{*p1}/{*p2}"""); 668var tree = Test(@"""{*p1}abc{*p2}"""); 678var tree = Test(@"""foo/{*}"""); 696var tree = Test(@"""" + template.Replace(@"\", @"\\") + @""""); 704var tree = Test(@"""foo/{{p1}"""); 711var tree = Test(@"""foo/{p1}}"""); 719var tree = Test(@"""{aaa}/{AAA}"""); 726var tree = Test(@"""{aaa}/{*AAA}"""); 733var tree = Test(@"""{a}/{aa}a}/{z}"""); 740var tree = Test(@"""{a}/{a{aa}/{z}"""); 747var tree = Test(@"""{a}/{}/{z}"""); 754var tree = Test(@"""{Controller}.mvc/{?}"""); 761var tree = Test(@"""{a}//{z}"""); 768var tree = Test(@"""foo/{p1}/{*p2}/{p3}"""); 775var tree = Test(@"""foo/aa{p1}{p2}"""); 784var tree = Test(@"""" + routePattern.Replace(@"\", @"\\") + @""""); 791var tree = Test(@"""~foo"""); 798var tree = Test(@"""foor?bar"""); 805var tree = Test(@"""{foor?b}"""); 812var tree = Test(@"""{a}/{*b?}"""); 830var tree = Test(@"""" + template + @"""", runSubTreeTests: false);
RouteEmbeddedLanguage\RoutePatternParserTests_ReplacementTests.cs (18)
16Test(@"""[controller]""", @"<Tree> 34Test(@"""[[controller]]""", @"<Tree> 50Test(@"""[controller""", @"<Tree> 71Test(@"""[cont[controller]""", @"<Tree> 92Test(@"""[]""", @"<Tree> 113Test(@"""]""", @"<Tree> 132Test(@"""[one][two]""", @"<Tree> 155Test(@"""[controller]/[action]""", @"<Tree> 183Test(@"""[controller][[""", @"<Tree> 204Test(@"""thisisSomeText[action]""", @"<Tree> 225Test(@"""[[-]][[/[[controller]]""", @"<Tree> 249Test(@"""[contr[[oller]/[act]]ion]""", @"<Tree> 277Test(@"""[contr}oller]/[act{ion]/{id}""", @"<Tree> 319Test(@"""[controller]/[[[action]]]/id""", @"<Tree> 361Test(@"""[controller]/[[[[[action]]]]]/id""", @"<Tree> 403Test(@"""[controller]/[[[[[[[action]]]]]]]/id""", @"<Tree> 445Test(@"""[controller]/[[[[[action]]]]]]]/id""", @"<Tree> 487Test(@"""controller]""", @"<Tree>