Cuckoo icon indicating copy to clipboard operation
Cuckoo copied to clipboard

Support for nested classes [Feature request]

Open msewell opened this issue 8 years ago • 2 comments

It is common to nest classes for namespacing reasons:

// In Outer.swift

class Outer {
    // ...

    class Inner {
        // ...
    }
}

Currently, Cuckoo will generate MockOuter from Outer.swift, but not MockInner (well, MockOuter.MockInner). This is a bit of a bummer, since developers will have to either write MockInnner themselves, or move Inner to the same level as Outer in their production code to allow for automated mock generation through Cuckoo, thus negating the benefits of namespacing and polluting the top-level namespace.

Is there a reason Cuckoo cannot generate MockInner as well as MockOuter? This is a feature I'd really like to see!

msewell avatar Nov 13 '17 08:11 msewell

Same problem here.

Having to workaround this limitation is tedious.

devluencer-089 avatar Nov 13 '17 09:11 devluencer-089

Also I want to know if there is support for class which inherit from another class to generate Mock class.

karan-sankey avatar Jan 23 '18 16:01 karan-sankey