Open
Description
The GetMock() method has a default value of MockBehavior.Default but the problem is that in this enumerable, MockBehavior.Default and MockBehavior.Loose have the exact same value.
From Moq sources:
public enum MockBehavior
{
Strict,
Loose,
Default = Loose,
}
So when the default behavior is MockBehavior.Strict and you call GetMock(MockBehavior.Loose) it's the same as calling GetMock(MockBehavior.Default) and it ends up creating a strict mock (which is the default), instead of a loose mock as requested.
Metadata
Metadata
Assignees
Labels
No labels