Quantcast
Channel: Alex FTPS Client
Viewing all articles
Browse latest Browse all 114

Commented Issue: Mocking capabilities [8722]

$
0
0
Hello,

I am coding a project using Alex FTPS Client as a library to provide FTP capabilities.

I use MoQ to unit test my code, but i can't mock FTPSClient. The problem is most of mocking libraries need the mocked code to be an interface, an abstract or non-sealed class.

Would it be possible to make Alex FTPS Client mockable ?

Thanks
Comments: ** Comment from web user: alexp **

Sure.

As a workaround for the moment you can just remove "sealed" from:

public sealed class FTPSClient : IDisposable

and recompile the solution.


Viewing all articles
Browse latest Browse all 114


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>