Description
Mockolate supports setting up and verifying protected members, but this is completely undocumented.
Missing Documentation
SetupMock.Protected.Method() and .Property()
VerifyMock.Protected.Invoked(), .Got(), .Set()
- Examples of working with protected methods and properties
Suggested Documentation
Add a new section titled "Working with Protected Members":
### Working with Protected Members
Mockolate allows you to setup and verify protected methods and properties:
```csharp
var sut = Mock.Create<MyChocolateDispenser>();
// Setup protected method
sut.SetupMock.Protected.Method(\"DispenseInternal\",
It.Is(\"Dark\"), It.IsAny<int>())
.Returns(true);
// Setup protected property
sut.SetupMock.Protected.Property(\"InternalStock\").InitializeWith(100);
// Verify protected method was called
sut.VerifyMock.Protected.Invoked(\"DispenseInternal\",
It.Is(\"Dark\"), It.IsAny<int>()).Once();
// Verify protected property was accessed
sut.VerifyMock.Protected.Got(\"InternalStock\").AtLeastOnce();
Description
Mockolate supports setting up and verifying protected members, but this is completely undocumented.
Missing Documentation
SetupMock.Protected.Method()and.Property()VerifyMock.Protected.Invoked(),.Got(),.Set()Suggested Documentation
Add a new section titled "Working with Protected Members":