kniemiec
Handling Custom Assembly Attributes in Unit Tests After Migrating from .NET Framework 4.8 to .NET 8
Specyfing was also something I thought about, but I was wondering if it is valid solution. Also solution that doesn't involve modyfing Product class code would be the best, since it is not my code. But if it is the only workaround I'll probably need to convice someone to implement it that way
Here is code, I had to make it screenshot due to character limitation
1)
2)
7 replies
Handling Custom Assembly Attributes in Unit Tests After Migrating from .NET Framework 4.8 to .NET 8
1. It has to be entry assembly.
But if it wasnt for it, how would you solve it?
2. Unfortunately, it has to. DI would be ideal but this is comming from some old code, which lets say, nowadays you wouldn't write. So yes, is has to be like this and in static constructor, is there a way to mock static constructor?
Any solution or idea would be appreaciated
7 replies