Mock Object

A controlled stand-in used to verify how code interacts with a dependency.

What is Mock Object in C#?

Mock Object — A controlled stand-in used to verify how code interacts with a dependency.

interface IClock
{
    int Hour();
}

class FakeClock : IClock
{
    public int Hour()
    {
        return 9;
    }
}

Level: Freelancer · More C# terms at this level

Updated

In other subjects