Reputation: 45
I need to MOQ wcfClientService while calling the SomeMethod()
.
Class ABC : IABC
{
internal WcfClientService wcfClientService = new WcfClientService();
public void SomeMethod(object pqr)
{
using(wcfClientService)
{
wcfClientService.Save(some parameters)
}
}
}
Upvotes: 0
Views: 144
Reputation: 4037
With the current implementation, you cannot isolate the "ABC" class as it is tightly coupled with wcfClientService. I would strongly suggest things mentioned below:
Upvotes: 1