Closed Spijkerboer closed 4 years ago
I thinks this can get really complex. Especially when you have a doctype that has compositions. On which interface do you generate the property.
If you end up with 2 interfaces unit testing will not be easier.
A quick solution could be to generate the properties as virtual. Than they can be mocked as well.
Dave
Hi Dave,
Thanks for your reply. Why can't the interface just inherit from the composition interface (like the classes are)
So: interface ITextPage: IDefaultComposition
That could be done. But I like I said I think that will get to complex in generation and HQ will not want this. I'm assuming this because they are blocking this one as well : https://github.com/umbraco/Umbraco-CMS/issues/7734
Thanks @Spijkerboer - we're currently not looking to add new features to the embedded version of Modelsbuilder and will refer to the community version of Modelsbuilder for advanced functionality like this.
@nul800sebastiaan this was created because it might be something for a Duug hackaton.
@Spijkerboer Sure thing, but we do not wish to add new features to the embedded Modelsbuilder at this point. Sorry.
To make unit testing al lot easier it would be nice if there is an interface generated for each modelsbuilder generated object. Currently interfaces are generated for compositions. It would be really helpful if they are generated for every type. This would make mocking a lot easier.
Because it's already being done for compositions I don't think I would be that difficult to do this.