bUnit v2 - The Blazor unit testing library vNext
Overview of bUnit v2, a major update to the Blazor unit testing library, covering new features, breaking changes, and API refinements.
Steven Giesel is a Senior Software Engineer and Microsoft MVP with over 13 years of experience, specializing in .NET and modern backend development. He shares deep technical knowledge across topics such as C#, EF Core, RavenDB, distributed systems, and cloud-native architectures, and is an active speaker in the .NET community.
311 articles from this blog
Overview of bUnit v2, a major update to the Blazor unit testing library, covering new features, breaking changes, and API refinements.
Explains how to use xUnit's TheoryData<T> for type-safe parameterized tests in C#, replacing untyped IEnumerable<object[]> data.
Explores new lock statement patterns in .NET 9, comparing the new Lock class with traditional Monitor-based locking and showing performance benchmarks.
Explains why using multiple boolean parameters in functions is problematic and demonstrates cleaner refactoring techniques.
An updated visual mind map of LINQ features and operations, now including all additions up to .NET 9.
A simplified infographic explaining how the .NET Garbage Collector works, with links to more detailed technical articles.
Explores new .NET 9 enhancements to the SearchValues object, enabling efficient string searches alongside character lookups.
Explores three new LINQ methods added in .NET 9: CountBy, AggregateBy, and Index, with code examples.
Explores alternatives to the deprecated BinaryFormatter in .NET 8, focusing on JSON and MessagePack for object serialization.
A critique of AutoMapper for C# object mapping, advocating for compile-time source generators like Mapperly as a simpler, more maintainable alternative.
Explores how const strings in C# can be modified using unsafe code and string interning, despite being compile-time constants.
A technical guide on implementing a lock-free ring buffer in C# for asynchronous logging, explaining its benefits and providing sample code.
Introduces the new System.Threading.Lock type in .NET 9, a dedicated lock type that aims to be more explicit and potentially faster than using a plain object with the lock keyword.
Explores the potential new 'params collections' feature in C# 13, allowing the params keyword to be used with collection types beyond arrays.
Introduces bUnit Generators, a tool for automatically creating stubs for third-party components in Blazor unit tests.
Explains how to store complex objects and lists as JSON in databases using Entity Framework 8 and 7, including configuration and benefits.
Explores creating a .NET 8 interceptor for bUnit to auto-generate stubs for Blazor components, improving unit testing.
Explains how to use Enhanced Form Navigation in Blazor .NET 8 for SPA-like form handling without full interactivity modes.
Explains the enhanced logging features in .NET 8, focusing on the improved LoggerMessageAttribute and source generators for better performance and readability.
An interactive LINQ tutorial for C# beginners using a visual marble-based learning tool to understand query operators.