문제

I am stuck to mock Entity Framework 6 asynchronous methods using JustMock. I searched in Google a lot but did not get any sufficient result. At last I got an example at testing with async queries but it is used Moq.

I am try to convert this into JustMock but i can not find anything like .As<TInterface>() in JustMock. Please tell me what is equivalent of moq.As in JustMock ?

도움이 되었습니까?

해결책

Seems that there is no pure equivalent option on this framework to Moq.As<TInterface>.

But, on Telerik's official documentation, multiple interface mocking is explained using as C# protected word.

// Arrange
var foo = Mock.Create<IFoo>();
var iDisposable = foo as IDisposable; // <<<<<<<<<<<<<<<<<<<<<<<<<<<< 

Read this documentation and try the solution proposed to do so.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top