This PR allows to create an alias for a mocked interface, which doesn't necessarily match the original interface name.
The reason is that large projects often keep mocks in a single package, but when there's a naming overlap between multiple interfaces coming from different packages (i.e.: foo.Cache and bar.Cache) it can get a little tricky.
The idea here is to optionally allow to specify the interface name upon the moq command invocation with a colon : separating the actual interface name and the aliased name. For example:
This PR allows to create an alias for a mocked interface, which doesn't necessarily match the original interface name.
The reason is that large projects often keep mocks in a single package, but when there's a naming overlap between multiple interfaces coming from different packages (i.e.:
foo.Cache
andbar.Cache
) it can get a little tricky.The idea here is to optionally allow to specify the interface name upon the
moq
command invocation with a colon:
separating the actual interface name and the aliased name. For example:which will generate
FooCacheMock
andBarCacheMock
.