hi all!
I'm trying to test service that using Rebex.Net.Ssh.
inside this service I use LoginAsync(username, pass) and ConnectAsync(host, port).
I've wrote this:
var sshMock = Mock.Of<Ssh>(m => m.IsConnected == true);
Mock.Get(sshMock).Setup(x => x.LoginAsync(It.IsAny<string>(), It.IsAny<int>())).Returns(Task.CompletedTask);
but faced with error - Exception thrown: 'System.NotSupportedException' in Moq.dll
What is the best way to write test with ssh components?
thank you in advance!