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
I have a solution with the SipSourcery project imported. I need to set the LookupClient in SIPDns and/or the ResolveSIPUriInternalAsync in SipTransport. The problem is that they are internals, despite there are suggestions they should be set when doing unit testing.
One solution would be to add [assembly: InternalsVisibleTo("name of assembly here")] in the SipSourcery project, but I really don't want to fork just because of this? Wouldn't it be appropriate to change the setters to be public?
Wouldn't also be more appropriate to use the interface "ILookupClient" to be able to mock?
public static LookupClient LookupClient
{
get
{
return _lookupClient;
}
internal set
{
// Intended to allow unit testing with client options that will cause the
// lookup logic to execute failure conditions.
_lookupClient = value;
}
}</div>
The text was updated successfully, but these errors were encountered:
Discussed in #508
Originally posted by henrik73 June 23, 2021
Hi
I have a solution with the SipSourcery project imported. I need to set the LookupClient in SIPDns and/or the ResolveSIPUriInternalAsync in SipTransport. The problem is that they are internals, despite there are suggestions they should be set when doing unit testing.
One solution would be to add [assembly: InternalsVisibleTo("name of assembly here")] in the SipSourcery project, but I really don't want to fork just because of this? Wouldn't it be appropriate to change the setters to be public?
Wouldn't also be more appropriate to use the interface "ILookupClient" to be able to mock?
The text was updated successfully, but these errors were encountered: