BenMorris / NetArchTest

A fluent API for .Net that can enforce architectural rules in unit tests.
MIT License
1.39k stars 82 forks source link

HaveNameEndingWith not working with Generics #130

Open jnhaffey opened 1 year ago

jnhaffey commented 1 year ago

I may be doing something wrong, but I have setup a rule to check my abstracts to verify they are ending with Base. This works fine for non-generic classes, but it is failing against generic classes. From what I can see in the debugger, the classes are producing a # value (example:1, 2,3) which I believe is causing the HaveNameEndingWith method to fail.

jnhaffey commented 1 year ago

I am going to leave this open as it may be something someone wants to try and find a better solution to but I figured out that I can use HaveNameMatching with a Regular Expression to solve the match with.