csharpdeeb25a2 | 1 | using CascadeIDE.Features.IdeMcp.Application; |
| 2 | using CascadeIDE.Services; |
| 3 | using Xunit; |
| 4 | |
| 5 | namespace CascadeIDE.Tests; |
| 6 | |
| 7 | public sealed class IdeMcpSolutionPathAvailabilityTests |
| 8 | { |
| 9 | [Fact] |
| 10 | public void IsRunnableSolutionFile_false_for_null_and_whitespace() |
| 11 | { |
| 12 | Assert.False(IdeMcpSolutionPathAvailability.IsRunnableSolutionFile(null)); |
| 13 | Assert.False(IdeMcpSolutionPathAvailability.IsRunnableSolutionFile("")); |
| 14 | Assert.False(IdeMcpSolutionPathAvailability.IsRunnableSolutionFile(" ")); |
| 15 | } |
| 16 | |
| 17 | [Fact] |
| 18 | public void IsRunnableSolutionFile_false_for_missing_file() |
| 19 | { |
| 20 | Assert.False(IdeMcpSolutionPathAvailability.IsRunnableSolutionFile(@"Z:\CascadeIDE\Tests\no-file-ever-831c.sln")); |
| 21 | } |
| 22 | |
| 23 | [Fact] |
| 24 | public void IdeMcpTestRunInstrumentationMutation_from_exception_opens_no_page() |
| 25 | { |
| 26 | var m = IdeMcpBuildTestOrchestrator.IdeMcpTestRunInstrumentationMutation.FromThrownException( |
| 27 | existingInstrumentationOutput: "", |
| 28 | exceptionMessage: "boom"); |
| 29 | Assert.False(m.ShouldOpenTestsPage); |
| 30 | Assert.Equal(0, m.ImpactedTestsBadge); |
| 31 | Assert.Contains("boom", m.UpdatedTestResultsOutput, StringComparison.Ordinal); |
| 32 | } |
| 33 | } |
| 34 | |
View only · write via MCP/CIDE