How can I mock WCF client? -
i have wcf client:
using (servicereference1.service1client host = new servicereference1.service1client()) { host.dosomething(); }
i can't mock 'host' because type of servicereference1.service1client - isn't interface.
i can set 'host' interface type:
using (servicereference1.iservice1 host = new servicereference1.service1client()) { host.dosomething(); }
but have error: servicereference1.iservice1 type used in using statement must implicity convertible system.idisposable.
what can do?
make sure iservice1 implements idisposable
Comments
Post a Comment