You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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's IType parameters, and I'd like to compare them vs expected System.Type(s) to make my test assertions. The IType has an .IsAssignableTo(IType) method, which I'd gladly use, however I'm not able to convert my System.Type(s) to an IType.
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?
The text was updated successfully, but these errors were encountered:
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.
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's
IType
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?
The text was updated successfully, but these errors were encountered: