On Sunday, 27 October 2013 at 14:34:14 UTC, Gary Willoughby wrote:
Can you provide a simple example please?
Just the same way you generate code for inheritance you can use to generate code for composition. You just call <membername>.method instead of super.method.

I don't know if anyone can call that a simple example, but it's all i have by hand:
https://github.com/QAston/DMocks-revived/blob/master/dmocks/object_mock.d
I use this technique to mock structs and final classes.

Reply via email to