Можно ли использовать насмешки Rhino для макета WindowsImpersonationContext?
Я получаю:
System.MissingMethodException: не удается найти конструктор с совпадающими аргументами ----> System.MissingMethodException: Конструктор типа «WindowsImpersonationContextProxy04bee852de914d5b8a47d6776edc4cb3 '
var windowsImpersonationContext = mockRepository.Stub<WindowsImpersonationContext>();
mockImpersonation.Stub(x => x.ImpersonateUser("username", "domain", "password")).Return(windowsImpersonationContext);
Вот мой код, который мне нужно смоделировать
public interface IImpersonation
{
WindowsImpersonationContext ImpersonateUser(string sUsername, string sDomain, string sPassword);
}