fluentassertions.analyzers icon indicating copy to clipboard operation
fluentassertions.analyzers copied to clipboard

Analyzers based on the FluentAssertions best practices docs

Results 49 fluentassertions.analyzers issues
Sort by recently updated
recently updated
newest added

Analyzer incorrectly recommends ContainsSingle for HaveCount(1).And.Contains()

[{"_id":"636268fececf4e081a26f8fa","body":"@AquilaSands is this an actual use-case? \r\nI think a better syntax would be\r\n```cs\r\ncollection.Should().ContainSingle().Which.Should().Be(1);\r\n```","issue_id":1662062721709,"origin_id":941250393,"user_origin_id":9786571,"create_time":1634062120,"update_time":1634062120,"id":1667393790020,"updated_at":"2022-11-02T12:56:30.019000Z","created_at":"2022-11-02T12:56:30.019000Z"},{"_id":"636268fececf4e081a26f8fb","body":"It was an actual use case for me but I agree the `Which().Should().Be()` is better, would it be possible for the analyzer to detect the `And.Contain()` and recommend the better syntax? ","issue_id":1662062721709,"origin_id":943393552,"user_origin_id":5774614,"create_time":1634220467,"update_time":1634220467,"id":1667393790024,"updated_at":"2022-11-02T12:56:30.023000Z","created_at":"2022-11-02T12:56:30.023000Z"},{"_id":"636268fececf4e081a26f8fc","body":"@AquilaSands I think so. I'll take a look","issue_id":1662062721709,"origin_id":945151333,"user_origin_id":9786571,"create_time":1634486803,"update_time":1634486803,"id":1667393790028,"updated_at":"2022-11-02T12:56:30.028000Z","created_at":"2022-11-02T12:56:30.028000Z"}] comment

### Description Analyzer incorrectly recommends `ContainsSingle()` for `HaveCount(1).And.Contains(predicate)` but looking at the tests for ContaiansSingle they are not equivalent as shown by this test https://github.com/fluentassertions/fluentassertions/blob/501cf353ecc872154fae54960ee1b692851bfb8a/Tests/FluentAssertions.Specs/Collections/GenericCollectionAssertionsSpecs.cs#L302-L314 which passes when a collection...

bug

AD0001: InvalidOperationException on 2 rules

[{"_id":"636266e1ea01ec786e823626","body":"I encountered the same issue in one of our projects today and was able to narrow down the issue and created a small example to reproduce the problem. \r\n\r\n``` [Test]\r\n public void Test1()\r\n {\r\n var sut = new List<Dictionary<string, string>>();\r\n sut.Add(new Dictionary<string, string> { {\"testKey\", \"testValue\"}});\r\n sut[0][\"testKey\"].Should().Be(\"testValue\");\r\n }\r\n```","issue_id":1662062721712,"origin_id":571785842,"user_origin_id":30199568,"create_time":1578433247,"update_time":1578433247,"id":1667393249312,"updated_at":"2022-11-02T12:47:29.312000Z","created_at":"2022-11-02T12:47:29.312000Z"},{"_id":"636266e1ea01ec786e823627","body":"same issue here\r\n\r\ngetting\r\n\r\n`>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.`","issue_id":1662062721712,"origin_id":613440214,"user_origin_id":73215,"create_time":1586870645,"update_time":1586870645,"id":1667393249317,"updated_at":"2022-11-02T12:47:29.316000Z","created_at":"2022-11-02T12:47:29.316000Z"},{"_id":"636266e1ea01ec786e823628","body":"any updates on this?","issue_id":1662062721712,"origin_id":617677623,"user_origin_id":73215,"create_time":1587549325,"update_time":1587549325,"id":1667393249320,"updated_at":"2022-11-02T12:47:29.319000Z","created_at":"2022-11-02T12:47:29.319000Z"},{"_id":"636266e1ea01ec786e823629","body":"Could you share a code sample for that triggers this?","issue_id":1662062721712,"origin_id":617683378,"user_origin_id":9786571,"create_time":1587550034,"update_time":1587550034,"id":1667393249323,"updated_at":"2022-11-02T12:47:29.323000Z","created_at":"2022-11-02T12:47:29.323000Z"},{"_id":"636266e1ea01ec786e82362a","body":"my best guess is;\r\n\r\n```cs\r\nusing NodaTime;\r\nusing NodaTime.Extensions;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\n\r\npublic class ProcessorTestsFixtureCollection : IEnumerable<object[]>\r\n {\r\n public IEnumerator<object[]> GetEnumerator()\r\n {\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() \/\/ current hour.\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromHours(1) \/\/ a hour ago.\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromHours(1), \/\/ a hour ago\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() \/\/ current hour\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromHours(1), \/\/ two hour ago\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromHours(2) \/\/ a hour ago\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromDays(1) \/\/ a day ago\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromDays(1), \/\/ a day ago\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() \/\/ current day\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromDays(2), \/\/ two days ago.\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromDays(1) \/\/ a day ago.\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromMonths(1) \/\/ a month ago\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromMonths(1), \/\/ a month ago\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() \/\/ current month\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromMonths(2), \/\/ two months ago\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromMonths(1) \/\/ a month ago.\r\n }\r\n };\r\n\r\n yield return new object[]\r\n {\r\n new List<LocalDateTime>\r\n {\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromMonths(2) - Period.FromDays(2) - Period.FromHours(2), \/\/ 2 months, 2 days, 2 hours ago\r\n SystemClock.Instance.InTzdbSystemDefaultZone().GetCurrentLocalDateTime() - Period.FromMonths(1) - Period.FromDays(1) - Period.FromHours(1) \/\/ a month, a day and a hour ago.\r\n }\r\n };\r\n }\r\n\r\n IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();\r\n }\r\n```\r\n\r\noutput;\r\n\r\n```\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldContainItemAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveElementAtAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n3>CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This operation does not apply to an empty instance.'.\r\n```\r\n","issue_id":1662062721712,"origin_id":617685251,"user_origin_id":73215,"create_time":1587550276,"update_time":1634062233,"id":1667393249326,"updated_at":"2022-11-02T12:47:29.325000Z","created_at":"2022-11-02T12:47:29.325000Z"},{"_id":"636266e1ea01ec786e82362b","body":"I just hit this as well. This code works fine:\r\n\r\n```csharp\r\nvar conditions = blocks[2].Questions[1].Conditions;\r\nconditions.Should().HaveCount(1);\r\n```\r\n\r\nThis code triggers the exception:\r\n\r\n```csharp\r\nblocks[2].Questions[1].Conditions.Should().HaveCount(1)\r\n```\r\n","issue_id":1662062721712,"origin_id":649069023,"user_origin_id":1864281,"create_time":1593032452,"update_time":1593032452,"id":1667393249329,"updated_at":"2022-11-02T12:47:29.329000Z","created_at":"2022-11-02T12:47:29.329000Z"},{"_id":"636266e1ea01ec786e82362c","body":"I'm not able to reproduce this anymore, I think was fixed in #100 ","issue_id":1662062721712,"origin_id":941254706,"user_origin_id":9786571,"create_time":1634062407,"update_time":1634062407,"id":1667393249332,"updated_at":"2022-11-02T12:47:29.332000Z","created_at":"2022-11-02T12:47:29.332000Z"},{"_id":"636266e1ea01ec786e82362d","body":"If I'm not mistaken, #100 just swallows exception. So maybe the exception is no longer visible to the user, but it doesn't mean the underlying problem (whatever it is) is solved.","issue_id":1662062721712,"origin_id":942139514,"user_origin_id":1864281,"create_time":1634119690,"update_time":1634119968,"id":1667393249335,"updated_at":"2022-11-02T12:47:29.334000Z","created_at":"2022-11-02T12:47:29.334000Z"}] comment

### Description The rules `CollectionShouldContainSingleAnalyzer` and `CollectionShouldBeEmptyAnalyzer` throws `InvalidOperationException` with message `This operation does not apply to an empty instance`. For some weird reason, the stack trace disappear every time...

bug
help wanted

failing test for false positive on XmlNodeList.Should().HaveCount(1)

[{"_id":"63625e41d297b621323b4274","body":"I have added some more failing tests concerning collection assertions. Plus, I have added tests which should fail as soon as FluentAssertions has added the \"missing\" assertions. I guess I'm abusing your nice test framework a bit, but I think it does the job...","issue_id":1662062721716,"origin_id":428825639,"user_origin_id":352576,"create_time":1539235755,"update_time":1539235755,"id":1667391041986,"updated_at":"2022-11-02T12:10:41.986000Z","created_at":"2022-11-02T12:10:41.986000Z"}] comment

failing test demonstrating fluentassertions/fluentassertions.analyzers#82

Bug for NullConditionalAssertion

[{"_id":"6362683e3056137e2664a394","body":"Just noticed the same thing. This is definitely a false positive.","issue_id":1662062721720,"origin_id":647560042,"user_origin_id":1864281,"create_time":1592836668,"update_time":1592836668,"id":1667393598311,"updated_at":"2022-11-02T12:53:18.311000Z","created_at":"2022-11-02T12:53:18.311000Z"},{"_id":"66888519017dd1929302f73c","body":"Please fix.\r\n\r\nIn an expression like:\r\n```csharp\r\nX?.Y.Should().Be(expected);\r\n```\r\nit is absolutely true that the entire \"chain\" `.Y.Should().Be(expected)` will be skipped if `X` is null. In particular, `Should` and `Be` are never called, and a warning is reasonable.\r\n\r\nHowever, in the statement:\r\n```csharp\r\n(X?.Y).Should().Be(expected);\r\n```\r\nthe chain stops at `)` and `Should` is always called. It is an extension method that can be called in a meaningful way on a null, even a reference-type null (which can occur if the compile-time type of `Y` is a reference type; in iron9light's example it was a value type which gives a `Nullable<>` which is also fine).","issue_id":1662062721720,"origin_id":1378817975,"user_origin_id":20839943,"create_time":1673446526,"update_time":1673446526,"id":1720223001921,"updated_at":"2024-07-05T23:43:21.920000Z","created_at":"2024-07-05T23:43:21.920000Z"},{"_id":"6688851a017dd1929302f73d","body":"@JeppeSN which analyzer is triggering the warning here?","issue_id":1662062721720,"origin_id":1380040595,"user_origin_id":9786571,"create_time":1673515788,"update_time":1673515788,"id":1720223002203,"updated_at":"2024-07-05T23:43:22.203000Z","created_at":"2024-07-05T23:43:22.203000Z"},{"_id":"6688851a017dd1929302f73e","body":"resolved by #170","issue_id":1662062721720,"origin_id":1565686255,"user_origin_id":9786571,"create_time":1685222214,"update_time":1685222214,"id":1720223002207,"updated_at":"2024-07-05T23:43:22.206000Z","created_at":"2024-07-05T23:43:22.206000Z"}] comment

```csharp // cloudEvent.Time is Nullable (cloudEvent.Time?.ToUniversalTime()).Should().Be(cloudEvent2.Time?.ToUniversalTime()); ``` This code will get a NullConditionalAssertion warning. But ```csharp var x = cloudEvent.Time?.ToUniversalTime(); x.Should().Be(cloudEvent2.Time?.ToUniversalTime()); ``` has no warning. Is it a bug of...

### Description When a class implements `IDictionary` and a custom `ContainsKey(TKey1, TKey2)`, the analyzer does not distinguish between `IDictionary.ContainsKey(TKey)` and `ContainsKey(TKey1, TKey2)`. Related to #65 ### Complete minimal example reproducing...

IOException when installing NuGet-package via paket

[{"_id":"63626b49d297b621323b484e","body":"does packet execute the [tool\/install.ps1](https:\/\/github.com\/fluentassertions\/fluentassertions.analyzers\/blob\/master\/src\/FluentAssertions.Analyzers\/tools\/install.ps1) script and then fail?","issue_id":1662062721729,"origin_id":425662146,"user_origin_id":9786571,"create_time":1538242311,"update_time":1538242311,"id":1667394377271,"updated_at":"2022-11-02T13:06:17.271000Z","created_at":"2022-11-02T13:06:17.271000Z"},{"_id":"63626b49d297b621323b484f","body":"As far as I can see when I run `paket install --verbose` the `install.ps1` gets not executed.\r\n\r\nBit this looks correct after reading those Issues:\r\n[VS 2017 doesn't execute install.ps1 from packages if used as PackageReference](https:\/\/github.com\/NuGet\/Home\/issues\/6330)\r\n[Come up with a strategy for packages that have install.ps1\/uninstall.ps1](https:\/\/github.com\/NuGet\/Home\/issues\/5963)","issue_id":1662062721729,"origin_id":427666056,"user_origin_id":8678671,"create_time":1538929415,"update_time":1538929415,"id":1667394377276,"updated_at":"2022-11-02T13:06:17.275000Z","created_at":"2022-11-02T13:06:17.275000Z"},{"_id":"63626b49d297b621323b4850","body":"looks like this error is out of the scope of this project","issue_id":1662062721729,"origin_id":427675460,"user_origin_id":9786571,"create_time":1538936877,"update_time":1538936877,"id":1667394377278,"updated_at":"2022-11-02T13:06:17.278000Z","created_at":"2022-11-02T13:06:17.278000Z"},{"_id":"63626b49d297b621323b4851","body":"I don't think so, @Meir017 \r\nIf the package gets created in a different way it would work.","issue_id":1662062721729,"origin_id":427737357,"user_origin_id":8678671,"create_time":1538982132,"update_time":1538982132,"id":1667394377280,"updated_at":"2022-11-02T13:06:17.280000Z","created_at":"2022-11-02T13:06:17.280000Z"},{"_id":"63626b49d297b621323b4852","body":"@patrickweegen, Do you have an example of an Analyzers nuget package that can be installed using packet?","issue_id":1662062721729,"origin_id":455950648,"user_origin_id":9786571,"create_time":1548047617,"update_time":1548047617,"id":1667394377283,"updated_at":"2022-11-02T13:06:17.283000Z","created_at":"2022-11-02T13:06:17.283000Z"},{"_id":"63626b49d297b621323b4853","body":"I have successfully installed the [FakeItEasy.Analyzer.Csharp](https:\/\/www.nuget.org\/packages\/FakeItEasy.Analyzer.CSharp\/).","issue_id":1662062721729,"origin_id":456100904,"user_origin_id":8678671,"create_time":1548082537,"update_time":1548082537,"id":1667394377286,"updated_at":"2022-11-02T13:06:17.285000Z","created_at":"2022-11-02T13:06:17.285000Z"}] comment

### Description When installing the NuGet-package using paket, an IOException is thrown: ``` Paket failed with -> Error during extraction of D:\projects\...\packages\FluentAssertions.Analyzers\fluentassertions.analyzers.0.11.4.nupkg. In rare cases a firewall might have blocked...

InvalidOperationException during build

[{"_id":"63626582ea01ec786e823552","body":"can you provide a minimal code sample that will reproduce this error?","issue_id":1662062721732,"origin_id":413880011,"user_origin_id":9786571,"create_time":1534515380,"update_time":1534515380,"id":1667392898243,"updated_at":"2022-11-02T12:41:38.243000Z","created_at":"2022-11-02T12:41:38.243000Z"},{"_id":"63626582ea01ec786e823553","body":"Unfortunately not, because I don't know what's causing this to happen. The Debug output is not very informative and only tells me what I copied above.\r\nHow could I trace this down to see where the exception actually happens?","issue_id":1662062721732,"origin_id":413892020,"user_origin_id":1489823,"create_time":1534517722,"update_time":1534517722,"id":1667392898247,"updated_at":"2022-11-02T12:41:38.246000Z","created_at":"2022-11-02T12:41:38.246000Z"},{"_id":"63626582ea01ec786e823554","body":"@FantasyTeddy just released [0.11.4](https:\/\/www.nuget.org\/packages\/FluentAssertions.Analyzers\/0.11.4)","issue_id":1662062721732,"origin_id":413899890,"user_origin_id":9786571,"create_time":1534519300,"update_time":1534519300,"id":1667392898250,"updated_at":"2022-11-02T12:41:38.249000Z","created_at":"2022-11-02T12:41:38.249000Z"},{"_id":"63626582ea01ec786e823555","body":"Unfortunately my guess was incorrect, I still have this exception in two of my projects with the new version...","issue_id":1662062721732,"origin_id":414199437,"user_origin_id":1489823,"create_time":1534742113,"update_time":1534742113,"id":1667392898253,"updated_at":"2022-11-02T12:41:38.252000Z","created_at":"2022-11-02T12:41:38.252000Z"},{"_id":"63626582ea01ec786e823556","body":"Could you create a repository with your code?","issue_id":1662062721732,"origin_id":414203849,"user_origin_id":9786571,"create_time":1534744161,"update_time":1534744161,"id":1667392898255,"updated_at":"2022-11-02T12:41:38.255000Z","created_at":"2022-11-02T12:41:38.255000Z"},{"_id":"63626582ea01ec786e823557","body":"Note: It seems that error message is only used for:\r\n* `ImmutableQueue.Peek()`\r\n* `ImmutableQueue.PeekRef()`\r\n* `ImmutableStack.Peek()`\r\n* `ImmutableStack.PeekRef()`\r\nhttps:\/\/github.com\/dotnet\/corefx\/search?q=InvalidEmptyOperation&unscoped_q=InvalidEmptyOperation","issue_id":1662062721732,"origin_id":414207613,"user_origin_id":919634,"create_time":1534745653,"update_time":1534750052,"id":1667392898258,"updated_at":"2022-11-02T12:41:38.258000Z","created_at":"2022-11-02T12:41:38.258000Z"},{"_id":"63626582ea01ec786e823558","body":"The code base I am working with is business code from our company which unfortunately cannot be made public. I can do some digging if you give me some hints how I can get more information about this exception.","issue_id":1662062721732,"origin_id":414213585,"user_origin_id":1489823,"create_time":1534747561,"update_time":1534747561,"id":1667392898261,"updated_at":"2022-11-02T12:41:38.261000Z","created_at":"2022-11-02T12:41:38.261000Z"},{"_id":"63626582ea01ec786e823559","body":"I have the same issue, my repository is OS:\r\n\r\nhttps:\/\/github.com\/csoltenborn\/GoogleTestAdapter\r\n\r\nSee build instructions in the Wiki...","issue_id":1662062721732,"origin_id":427553317,"user_origin_id":352576,"create_time":1538810890,"update_time":1538810890,"id":1667392898265,"updated_at":"2022-11-02T12:41:38.264000Z","created_at":"2022-11-02T12:41:38.264000Z"},{"_id":"668885459c3ac94e9f0cf49d","body":"@csoltenborn is this still an issue?","issue_id":1662062721732,"origin_id":1565686856,"user_origin_id":9786571,"create_time":1685222326,"update_time":1685222326,"id":1720223045632,"updated_at":"2024-07-05T23:44:05.631000Z","created_at":"2024-07-05T23:44:05.631000Z"},{"_id":"668885459c3ac94e9f0cf49e","body":"Sorry, can't comment on that - I moved on to different things...\n\nMeir Blachman ***@***.***> schrieb am So., 28. Mai 2023,\n04:18:\n\n> @csoltenborn <https:\/\/github.com\/csoltenborn> is this still an issue?\n>\n> \u2014\n> Reply to this email directly, view it on GitHub\n> <https:\/\/github.com\/fluentassertions\/fluentassertions.analyzers\/issues\/78#issuecomment-1565686856>,\n> or unsubscribe\n> <https:\/\/github.com\/notifications\/unsubscribe-auth\/AACWCQDYMQDV6LZOIYAKJFTXIJVUDANCNFSM4FQGJHEQ>\n> .\n> You are receiving this because you were mentioned.Message ID:\n> ***@***.***\n> com>\n>\n","issue_id":1662062721732,"origin_id":1565891790,"user_origin_id":352576,"create_time":1685251044,"update_time":1685251044,"id":1720223045636,"updated_at":"2024-07-05T23:44:05.635000Z","created_at":"2024-07-05T23:44:05.635000Z"}] comment

### Description In some of my projects I get the following error when building: ``` CSC : warning AD0001: Analyzer 'FluentAssertions.Analyzers.CollectionShouldHaveCountAnalyzer' threw an exception of type 'System.InvalidOperationException' with message 'This...

bug

https://github.com/fluentassertions/fluentassertions/blob/5.2.0/docs/_data/tips/datetimes.yml

enhancement

https://github.com/fluentassertions/fluentassertions/blob/master/docs/_data/tips/types.yml

enhancement

Create a refactoring for asserting exceptions properties

[{"_id":"63625e45d297b621323b4275","body":"@jnyrup @dennisdoomen does this make sense?","issue_id":1662062721740,"origin_id":399164825,"user_origin_id":9786571,"create_time":1529598579,"update_time":1529598579,"id":1667391045365,"updated_at":"2022-11-02T12:10:45.364000Z","created_at":"2022-11-02T12:10:45.364000Z"},{"_id":"63625e45d297b621323b4276","body":"Sure.","issue_id":1662062721740,"origin_id":399182394,"user_origin_id":572734,"create_time":1529602101,"update_time":1529602101,"id":1667391045368,"updated_at":"2022-11-02T12:10:45.368000Z","created_at":"2022-11-02T12:10:45.368000Z"},{"_id":"63625e45d297b621323b4277","body":"I don't really have any gut feelings about this.","issue_id":1662062721740,"origin_id":399745871,"user_origin_id":919634,"create_time":1529836043,"update_time":1529836043,"id":1667391045372,"updated_at":"2022-11-02T12:10:45.372000Z","created_at":"2022-11-02T12:10:45.372000Z"}] comment

for example: ```cs public class MyCustomException : Exception { public string MyCustomProperty { get; } public MyCustomException(string myCustomProperty) { MyCustomProperty = MyCustomProperty; } } ``` when hovering over the property...

idea