csharpdeeb25a2 | 1 | using CascadeIDE.Features.Launch.DataAcquisition; |
| 2 | using Xunit; |
| 3 | |
| 4 | namespace CascadeIDE.Tests; |
| 5 | |
| 6 | public sealed class LaunchSettingsJsonImportHeuristicTests |
| 7 | { |
| 8 | [Theory] |
| 9 | [InlineData("http://localhost:5000", true)] |
| 10 | [InlineData("https://127.0.0.1:1", true)] |
| 11 | [InlineData("http://a;https://b", true)] |
| 12 | [InlineData(" http://x ; ; https://y ", true)] |
| 13 | [InlineData("ftp://x", false)] |
| 14 | [InlineData("something-htt-else", false)] |
| 15 | [InlineData(null, false)] |
| 16 | [InlineData("", false)] |
| 17 | [InlineData(" ", false)] |
| 18 | public void ApplicationUrlsSuggestKestrelListener_Matches_Expected(string? urls, bool expected) => |
| 19 | Assert.Equal(expected, LaunchSettingsJsonImport.ApplicationUrlsSuggestKestrelListener(urls)); |
| 20 | } |
| 21 | |
View only · write via MCP/CIDE