Skip to content

Add ability to override VirtualPathResolver #1

@Daniel15

Description

@Daniel15

As far as I can see, FileResolver is an internal class so a custom/stub implementation of VirtualPathResolver can't be added. This may be beneficial for unit tests, as you've done in the Rejuicer tests (https://github.com/skroonenburg/Rejuicer/blob/master/Source/Rejuicer/Rejuicer-test/FluentConfigurerTests.cs)

In my case, we're hosting multiple sites with the same codebase and are using merge fields in a template (ie. {javascript} inserts references to generic JavaScript files used by every site). There are unit tests around these merge fields and hence Rejuicer is being invoked in the unit tests. I'm having issues stubbing Server.MapPath with Rhino Mocks so I think it'd be easier to just have a custom Virtual PathResolver in Rejuicer.

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