Skip to content

Does it make sense to allow any top-level type, not just Controllers? #8

@cottsak

Description

@cottsak

Some MVC work means that the controller is not the entry point: think BaseController or BasePage - things that are used directly on views, particularly layouts. Since these don't have a specific controller action entry point, how do we test these?

Does it make sense to expand this framework to allow the SUT to be any type/interface such that the ActAction()/InvokeAction() can be called against any method and still have a 'real' IoC container integrate the test completely down to the real database? This way we could pull out an interface used in say BaseController, test one of it's methods and expect the rest of the dependencies to be real and integrated against the real db. Or does this move too far from the notion of a Subcutaneous Test? One could argue that in the spirit of Subcutaneous Testing we're ok, because we're still trying to stay as close to the surface as pragmatically possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions