public void AnalysisRunContext_WhenSyntaxTreeIsNull_ReturnsNull() { // Arrange var ctx = new AnalysisRunContext(null, null); // Act & Assert ctx.SyntaxTree.Should().BeNull(); }
public void AnalysisRunContext_WhenSupportedDiagnosticsIsNull_ReturnsEmptyCollection() { // Arrange var ctx = new AnalysisRunContext(null, null); // Act & Assert ctx.SupportedDiagnostics.Should().NotBeNull(); ctx.SupportedDiagnostics.Should().BeEmpty(); }
public void AnalysisRunContext_ReturnsSameSyntaxTree() { // Arrange var treeMock = new Mock <SyntaxTree>(); var ctx = new AnalysisRunContext(treeMock.Object, null); // Act & Assert ctx.SyntaxTree.Should().Be(treeMock.Object); }
public void AnalysisRunContext_ReturnsSameCollectionOfDiagnosticDescriptors() { // Arrange var collection = new List <DiagnosticDescriptor> { new DiagnosticDescriptor("id", "title", "message", "category", DiagnosticSeverity.Error, false) }; var ctx = new AnalysisRunContext(null, collection); // Act & Assert ctx.SupportedDiagnostics.Should().Equal(collection); }