Skip to content

Commit 6aa85f4

Browse files
committed
Added REPL test for Microsoft.NET.Sdk.Web
1 parent 8705013 commit 6aa85f4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Dotnet.Script.Shared.Tests/InteractiveRunnerTestsBase.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,5 +307,25 @@ public async Task ScriptPackageReferenceAsTheFirstLine()
307307
var result = ctx.Console.Out.ToString();
308308
Assert.Contains("[Submission#0+SimpleTargets+TargetDictionary]", result);
309309
}
310+
311+
[Fact]
312+
public async Task ShouldCompileAndExecuteWithWebSdk()
313+
{
314+
var commands = new[]
315+
{
316+
@"#r ""sdk:Microsoft.NET.Sdk.Web""",
317+
"using Microsoft.AspNetCore.Builder;",
318+
"var a = WebApplication.Create();",
319+
@"a.GetType()",
320+
"#exit"
321+
};
322+
323+
var ctx = GetRunner(commands);
324+
await ctx.Runner.RunLoop();
325+
326+
var result = ctx.Console.Out.ToString();
327+
328+
Assert.Contains("[Microsoft.AspNetCore.Builder.WebApplication]", result);
329+
}
310330
}
311331
}

0 commit comments

Comments
 (0)