Seems like you need to set up the parameter expectations on your mock:
mockHttpManager
.Setup(x => x.HttpGet(
It.IsAny<Uri>(),
It.IsAny<CookieContainer>(),
It.IsAny<HttpRequestSettings>()))
.Returns(() => "HTML SERVER RESPONSE");
Ideally, you should use It.Is<T>()
to match the arguments, to ensure that the method is called with the exact parameters you expect. For example, you may want to test that your Login
method calls HttpGet
with ServerUrl.LogOn
:
It.Is<Uri>(uri => uri == ServerUrl.LogOn),