Replace FluentAssertions with AwesomeAssertions#2966
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (146)
✅ Files skipped from review due to trivial changes (97)
🚧 Files skipped from review as they are similar to previous changes (39)
📝 WalkthroughWalkthroughCentralized package management was updated to replace Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/Elastic.Markdown.Tests/PrettyHtmlExtensions.cs (1)
83-84:⚠️ Potential issue | 🟠 MajorFix expected-string normalization in
ShouldContainHtml.Line 84 uses
actualinstead ofexpected, so the pre-check always compares the same string and can mask real assertion failures.Proposed fix
var actualCompare = actual.Replace("\t", string.Empty); - var expectedCompare = actual.Replace("\t", string.Empty); + var expectedCompare = expected.Replace("\t", string.Empty);Also applies to: 88-89
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/Elastic.Markdown.Tests/PrettyHtmlExtensions.cs` around lines 83 - 84, In ShouldContainHtml (PrettyHtmlExtensions.cs) the expected string normalization uses `actual` instead of `expected`, so change the `expectedCompare` assignment to call Replace on `expected` (i.e., use `expected.Replace("\t", string.Empty)`), and make the same correction for the second pair at the other occurrence (lines referenced as 88-89) so both pre-check comparisons normalize the expected string rather than duplicating actual.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@tests/Elastic.Documentation.Api.Infrastructure.Tests/Adapters/AskAi/StreamTransformerTests.cs`:
- Line 172: The assertion events.Should().HaveCountGreaterThanOrEqualTo(0) is a
no-op; update the test in StreamTransformerTests (the test that populates the
local variable/events collection) to assert a deterministic outcome: replace the
current assertion with a meaningful check such as events.Should().NotBeEmpty()
or events.Should().HaveCount(expectedCount) with the correct expectedCount based
on the test setup, or alternatively mark the test as skipped if the expected
behavior is not yet defined; ensure you modify the specific assertion line
referencing events.Should().HaveCountGreaterThanOrEqualTo(0) to one of these
concrete validations.
---
Outside diff comments:
In `@tests/Elastic.Markdown.Tests/PrettyHtmlExtensions.cs`:
- Around line 83-84: In ShouldContainHtml (PrettyHtmlExtensions.cs) the expected
string normalization uses `actual` instead of `expected`, so change the
`expectedCompare` assignment to call Replace on `expected` (i.e., use
`expected.Replace("\t", string.Empty)`), and make the same correction for the
second pair at the other occurrence (lines referenced as 88-89) so both
pre-check comparisons normalize the expected string rather than duplicating
actual.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 318edaa4-bad1-40bf-bad1-565c20636f88
📒 Files selected for processing (163)
Directory.Packages.propstests-integration/Directory.Build.propstests-integration/Elastic.Assembler.IntegrationTests/AssemblerConfigurationTests.cstests-integration/Elastic.Assembler.IntegrationTests/DocsSyncTests.cstests-integration/Elastic.Assembler.IntegrationTests/NavigationBuildingTests.cstests-integration/Elastic.Assembler.IntegrationTests/NavigationRootTests.cstests-integration/Elastic.Assembler.IntegrationTests/Search/SearchBootstrapFixture.cstests-integration/Elastic.Assembler.IntegrationTests/Search/SearchIntegrationTests.cstests-integration/Elastic.Assembler.IntegrationTests/ServeStaticTests.cstests-integration/Elastic.Assembler.IntegrationTests/SiteNavigationTests.cstests-integration/Elastic.Documentation.Api.IntegrationTests/AskAiGatewayStreamingTests.cstests-integration/Elastic.Documentation.Api.IntegrationTests/EuidEnrichmentIntegrationTests.cstests-integration/Elastic.Documentation.Api.IntegrationTests/OtlpProxyIntegrationTests.cstests-integration/Mcp.Remote.IntegrationTests/CoherenceToolsIntegrationTests.cstests-integration/Mcp.Remote.IntegrationTests/DocumentToolsIntegrationTests.cstests-integration/Mcp.Remote.IntegrationTests/DocumentUrlNormalizerTests.cstests-integration/Mcp.Remote.IntegrationTests/SearchToolsIntegrationTests.cstests-integration/Search.IntegrationTests/SearchRelevanceTests.cstests/Directory.Build.propstests/Elastic.ApiExplorer.Tests/OpenApiDocumentExporterTests.cstests/Elastic.ApiExplorer.Tests/ReaderTests.cstests/Elastic.Changelog.Tests/Changelogs/BundleAmendTests.cstests/Elastic.Changelog.Tests/Changelogs/BundleChangelogsTests.cstests/Elastic.Changelog.Tests/Changelogs/BundleLoading/BundleLoaderTests.cstests/Elastic.Changelog.Tests/Changelogs/BundleProfileGitHubReleaseTests.cstests/Elastic.Changelog.Tests/Changelogs/BundleReleaseVersionTests.cstests/Elastic.Changelog.Tests/Changelogs/ChangelogConfigurationTests.cstests/Elastic.Changelog.Tests/Changelogs/ChangelogRemoveTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/BasicInputTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/BlockingLabelTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/FlagsAndFeaturesTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/LabelMappingTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/PrFetchFailureTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/PrIntegrationTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/ReleaseNoteExtractionTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/ReleaseVersionTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/TitleProcessingTests.cstests/Elastic.Changelog.Tests/Changelogs/Create/ValidationTests.cstests/Elastic.Changelog.Tests/Changelogs/RemoveReleaseVersionTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/BasicRenderTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/BundleValidationTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/ChecksumValidationTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/DuplicateHandlingTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/ErrorHandlingTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/HideFeaturesTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/HighlightsRenderTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/OutputFormatTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/TitleTargetTests.cstests/Elastic.Changelog.Tests/Creation/CIEnrichmentTests.cstests/Elastic.Changelog.Tests/Creation/FilenameStrategyTests.cstests/Elastic.Changelog.Tests/Creation/PrInfoProcessorLabelBlockerTests.cstests/Elastic.Changelog.Tests/Evaluation/ChangelogPrEvaluationServiceTests.cstests/Elastic.Changelog.Tests/ReleaseNotesExtractorTests.cstests/Elastic.Documentation.Api.Infrastructure.Tests/Adapters/AskAi/StreamTransformerTests.cstests/Elastic.Documentation.Api.Infrastructure.Tests/Adapters/Search/StringHighlightExtensionsTests.cstests/Elastic.Documentation.Api.Infrastructure.Tests/Caching/DistributedCacheTests.cstests/Elastic.Documentation.Build.Tests/AssemblerBuildServiceTests.cstests/Elastic.Documentation.Build.Tests/IsolatedBuildServiceTests.cstests/Elastic.Documentation.Build.Tests/SitemapTests.cstests/Elastic.Documentation.Build.Tests/SymlinkValidationTests.cstests/Elastic.Documentation.Configuration.Tests/AssemblyConfigurationMatchTests.cstests/Elastic.Documentation.Configuration.Tests/CreateNavigationFileTests.cstests/Elastic.Documentation.Configuration.Tests/CrossLinkRegistryTests.cstests/Elastic.Documentation.Configuration.Tests/DocumentInferrerServiceTests.cstests/Elastic.Documentation.Configuration.Tests/DocumentationSetFileTests.cstests/Elastic.Documentation.Configuration.Tests/PhysicalDocsetTests.cstests/Elastic.Documentation.Configuration.Tests/ReleaseNotes/ChangelogTextUtilitiesTests.cstests/Elastic.Documentation.Configuration.Tests/ReleaseNotes/PublishBlockerExtensionsTests.cstests/Elastic.Documentation.Configuration.Tests/ReleaseNotes/VersionOrDateTests.cstests/Elastic.Documentation.Configuration.Tests/SiteNavigationFileTests.cstests/Elastic.Documentation.Configuration.Tests/VersionInferenceTests.cstests/Elastic.Documentation.LegacyDocs.Tests/LegacyPageLookupTests.cstests/Elastic.Markdown.Tests/AppliesTo/ApplicabilityTryParseTests.cstests/Elastic.Markdown.Tests/AppliesTo/ApplicableToJsonConverterRoundTripTests.cstests/Elastic.Markdown.Tests/AppliesTo/ApplicableToJsonConverterSerializationTests.cstests/Elastic.Markdown.Tests/AppliesTo/ProductApplicabilityToStringTests.cstests/Elastic.Markdown.Tests/Assembler/AssemblerHtmxMarkdownLinkTests.cstests/Elastic.Markdown.Tests/CodeBlocks/CallOutTests.cstests/Elastic.Markdown.Tests/CodeBlocks/CodeBlockArgumentsTests.cstests/Elastic.Markdown.Tests/CodeBlocks/CodeTests.cstests/Elastic.Markdown.Tests/CodeBlocks/ConsoleCodeBlockTests.cstests/Elastic.Markdown.Tests/Codex/CodexHtmxCrossLinkTests.cstests/Elastic.Markdown.Tests/CrossLinks/UriEnvironmentResolverTests.cstests/Elastic.Markdown.Tests/Directives/AdmonitionTests.cstests/Elastic.Markdown.Tests/Directives/AdmonitionUnsupportedTests.cstests/Elastic.Markdown.Tests/Directives/AgentSkillTests.cstests/Elastic.Markdown.Tests/Directives/ApplicabilitySwitchTests.cstests/Elastic.Markdown.Tests/Directives/ButtonTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogAnchorNavigationTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogBasicTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogConfigTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogHideLinksTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogMergeTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogMissingFileTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogPathResolutionTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogSubsectionsTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogTocFilteringTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogTypeFilterTests.cstests/Elastic.Markdown.Tests/Directives/ChangelogVersionSortingTests.cstests/Elastic.Markdown.Tests/Directives/CsvIncludeTests.cstests/Elastic.Markdown.Tests/Directives/DirectiveBaseTests.cstests/Elastic.Markdown.Tests/Directives/ImageCarouselTests.cstests/Elastic.Markdown.Tests/Directives/ImageTests.cstests/Elastic.Markdown.Tests/Directives/ListSubPagesTests.cstests/Elastic.Markdown.Tests/Directives/MathBlockTests.cstests/Elastic.Markdown.Tests/Directives/MermaidTests.cstests/Elastic.Markdown.Tests/Directives/TabTests.cstests/Elastic.Markdown.Tests/Directives/TableDirectiveTests.cstests/Elastic.Markdown.Tests/Directives/UnsupportedTests.cstests/Elastic.Markdown.Tests/Directives/VersionTests.cstests/Elastic.Markdown.Tests/DocSet/BreadCrumbTests.cstests/Elastic.Markdown.Tests/DocSet/NavigationTests.cstests/Elastic.Markdown.Tests/DocSet/NavigationTestsBase.cstests/Elastic.Markdown.Tests/DocSet/NestedTocTests.cstests/Elastic.Markdown.Tests/DocSet/RepositoryLinksTests.cstests/Elastic.Markdown.Tests/FileInclusion/HeadingOrderTests.cstests/Elastic.Markdown.Tests/FileInclusion/IncludeTests.cstests/Elastic.Markdown.Tests/FileInclusion/IncludedAppliesSwitchTests.cstests/Elastic.Markdown.Tests/FileInclusion/IncludedTabSetTests.cstests/Elastic.Markdown.Tests/FileInclusion/LiteralIncludeTests.cstests/Elastic.Markdown.Tests/FileSystemExtensionsTests.cstests/Elastic.Markdown.Tests/FrontMatter/YamlFrontMatterTests.cstests/Elastic.Markdown.Tests/Inline/AnchorLinkTests.cstests/Elastic.Markdown.Tests/Inline/AutoLinkTests.cstests/Elastic.Markdown.Tests/Inline/CommentTest.cstests/Elastic.Markdown.Tests/Inline/DirectiveBlockLinkTests.cstests/Elastic.Markdown.Tests/Inline/FootnotesTests.cstests/Elastic.Markdown.Tests/Inline/IconParserTests.cstests/Elastic.Markdown.Tests/Inline/ImagePathResolutionTests.cstests/Elastic.Markdown.Tests/Inline/InlineAnchorTests.cstests/Elastic.Markdown.Tests/Inline/InlineImageTest.cstests/Elastic.Markdown.Tests/Inline/InlineLinkTests.cstests/Elastic.Markdown.Tests/Inline/InlneBaseTests.cstests/Elastic.Markdown.Tests/Inline/SubstitutionInlineCodeTest.cstests/Elastic.Markdown.Tests/Inline/SubstitutionTest.cstests/Elastic.Markdown.Tests/Interpolation/InterpolationTests.cstests/Elastic.Markdown.Tests/Mover/MoverTests.cstests/Elastic.Markdown.Tests/OutputDirectoryTests.cstests/Elastic.Markdown.Tests/PrettyHtmlExtensions.cstests/Elastic.Markdown.Tests/RootIndexValidationTests.cstests/Elastic.Markdown.Tests/Search/DocumentationDocumentSerializationTests.cstests/Elastic.Markdown.Tests/SettingsInclusion/IncludeTests.cstests/Mcp.Remote.Tests/Mcp.Remote.Tests.csprojtests/Mcp.Remote.Tests/McpServerInstructionTests.cstests/Mcp.Remote.Tests/McpToolTelemetryTests.cstests/Navigation.Tests/Assembler/ComplexSiteNavigationTests.cstests/Navigation.Tests/Assembler/IdentifierCollectionTests.cstests/Navigation.Tests/Assembler/SiteDocumentationSetsTests.cstests/Navigation.Tests/Assembler/SiteNavigationTests.cstests/Navigation.Tests/Codex/CodexNavigationRenderingTests.cstests/Navigation.Tests/Codex/CodexNavigationTests.cstests/Navigation.Tests/Codex/GroupNavigationTests.cstests/Navigation.Tests/Isolation/ConstructorTests.cstests/Navigation.Tests/Isolation/DynamicUrlTests.cstests/Navigation.Tests/Isolation/FileInfoValidationTests.cstests/Navigation.Tests/Isolation/FileNavigationTests.cstests/Navigation.Tests/Isolation/FolderExcludeTests.cstests/Navigation.Tests/Isolation/FolderIndexFileRefTests.cstests/Navigation.Tests/Isolation/FolderSortOrderTests.cstests/Navigation.Tests/Isolation/NaturalStringComparerTests.cstests/Navigation.Tests/Isolation/NavigationStructureTests.cstests/Navigation.Tests/Isolation/PhysicalDocsetTests.cstests/Navigation.Tests/Isolation/ValidationTests.cs
Pretty much a drop-in replacement. Just a couple of calls changed their name slightly.