Relative Content

Tag Archive for c#.netunit-testingmoqxunit

Moq verify property init

How do i verify an init-call with Moq? I have the following property defined in an interface:

How to mock an object created inside a function

I would like to create unit test for my C# application. There are the functions which create objects inside and perform some checks on the created object. Since I want it to be unit test, functions should be separated from the object dependencies. Is there a way to mock objects created inside the function?

Ho wot mock an object created inside a function

I would like to create unit test for my C# application. There are the functions which create objects inside and perform some checks on the created object. Since I want it to be unit test, functions should be separated from the object dependencies. Is there a way to mock objects created inside the function?