Open mmisztal1980 opened 3 months ago
I'm asking myself the same question. Any tip to share, @alexanderlinne?
Ok, I found by some other people's example that you can do Architecture.GetClassOfType(typeof(YourClass))
or Architecture.GetInterfaceOfType(typeof(IYourInterface))
to get the instance that satisfies an IType interface for the lib methods.
I'd like to know if there's any better alternative, but this works.
Hope it helps.
Using a custom
ICondition<Class>
I'm writing a set of tests to validate a set of constructors in my library's layer. I'm enumerating constructor'sIType
parameters, and I'd like to compare them vs expectedSystem.Type
(s) to make my test assertions. TheIType
has an.IsAssignableTo(IType)
method, which I'd gladly use, however I'm not able to convert mySystem.Type
(s) to anIType
.I'm it that to be somewhat difficult to do, and I haven't found anything in the docs yet. Can anybody explain how can this be achieved?