0

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 ?

Sergey Berezovskiy
  • 232,247
  • 41
  • 429
  • 459
Hasanuzzaman
  • 1,822
  • 5
  • 36
  • 54

1 Answers1

0

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.

HuorSwords
  • 2,225
  • 1
  • 21
  • 34