-
Notifications
You must be signed in to change notification settings - Fork 144
Mock & Fake
Mehdi Hadeli edited this page Jan 8, 2023
·
12 revisions
- https://stackoverflow.com/questions/40820881/how-generate-list-of-string-with-bogus-library-in-c
- https://github.com/nickdodd79/AutoBogus#skipping
- Note: Autobogus doesn't generate values for
readonly
properties (propertyInfo.CanWrite == false in reflection) - Note:
AggregateId
can't benegative
in ourvalueobject
, and because autofaker will generate some random values maybe it gets a negative value and throws an exception, so we should define a rule here - Note: should a rule set be used to generate a type, then only members not defined in the rule set are auto generated.
- Note: because AutoFaker generate data also for private set and init members (not read only get) it doesn't work properly with
CustomInstantiator
and we should exclude theme one by one. - API mocking in C# with WireMock.Net
- Using WireMock for dotnet core Integration tests