Egil Hansen
banner
egilhansen.com
Egil Hansen
@egilhansen.com
890 followers 540 following 230 posts
Distinguished Developer at Delegate, Microsoft #MVP and creator of #bUnit. 🇩🇰 living in 🇮🇸. Creator of bunit.dev. #dotnet #blazor #bUnit #oss.
Posts Media Videos Starter Packs
Pinned
If you find my work in the #dotnet open-source community useful and you (or your company) would like to support my efforts, doing so through GitHub Sponsors is an excellent choice. Learn more here: github.com/sponsors/egil
Sponsor @egil on GitHub Sponsors
Support Egil’s open-source work in the .NET community. His primary contribution is the Blazor testing library bUnit, that enables testing of Blazor components like regular POCO.
github.com
Yeah I’ve lost countless hours to build pipelines.
Custom images/runners is the way to go. Basically docker image that runs your pipeline scripts. Then you have much more control over things.
Reposted by Egil Hansen
.NET @dot.net · 18d
You write tests. But are they helping you and your team?
In this .NET Rocks! episode, @egilhansen.com explores how to make tests more durable, insightful, and future-proof. Plus: should AI be writing your tests? 🤖 #dotnet
🎧 Listen here: msft.it/63323sFo2T
They will be very useful in source generator scenarios.
Suffering for your friends I see 🙂
Oh ffs. Spelling is hard. Pleasure. It’s a pleasure 😆
Try LinkedIn, it’s all self-congratulatory posts 🙂
I’ve also had good success using this package: www.nuget.org/packages/Mez...
I am more thinking about what to snapshot test and what not to snapshot test.

E.g., a rule I try to follow is to not include irrelevant (to the test) data in the snapshot, as it makes it harder to validate the snapshot when it changes.
@simoncropp.bsky.social do you have a list of does and donts in snapshot testing somewhere? Examples of good patterns and anti patterns with Verify?
Yep, saw this live. Huge respect for people that dare to be vulnerable; it’s such a powerful thing.
an incredibly moving talk from @rendle.dev
www.youtube.com/watch?v=fL2p...
Need a cure for that primitive obsession in #dotnet? Take a look at www.nuget.org/packages/Egi...

First real attempt at a source generator library. Happy with the result. A key feature is that it’s very easy to overwrite the default generated code, just as it is with C# record classes and structs.
Egil.StronglyTypedPrimitives 1.9.7
A source generator for creating strongly-typed primitive types that makes it easy to avoid the primitive obsession anti pattern. Add a [StronglyTyped] attribute to a partial record struct ...
www.nuget.org
Going live with @steven-giesel.com for the first #bUnit dev session of this month. We may even get a visit from @scottsauber.com :)

Join at twitch.tv/egilhansen and www.youtube.com/watch?v=jZrZ...
Congrats Scott. You are living the dream!
This could be said about the internet in general.
its amazing how chatgpt knows everything about subjects I know nothing about, but is wrong like 40% of the time in things im an expert on. not going to think about this any further
Actually, I think I usually do a `git clean -fdx` for a "reset the world" operation.
There is a git command that does it, just can’t remember it when I need it, so have to search the web. If your tool had a -all option that would be great 😊
Could it also have an option that does the same a clean git clone?

Sometimes deleting e.g., the .vs folder helps with weirdness in vs.
By using Aspire and related client libraries you get basic telemetry out of the box (without solution specific context), so I’ll do that and then add some/few end-2-end tests for basic protection against regressions.
Solve different problems, so it’s like comparing apples and oranges.
@captainsafia.com does (or will) #dotnet's OpenApi generator have a way to declare a custom schema transformer for type as an attribute, like we can with JsonConverter?

E.g.:

[OpenApiTransformer()]
public record MyId(int Value);