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 **
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.