Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock function or template of tested xsl #45

Open
GoogleCodeExporter opened this issue Apr 20, 2015 · 0 comments
Open

Mock function or template of tested xsl #45

GoogleCodeExporter opened this issue Apr 20, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Task:
xspec is used to test template A which calls function F and behaves accordingly 
to F results.
In order to simplify testing of A - ability to mock function F for current test 
suite (x:description) is crucial.

Solutions:
1. Stylesheet M with mocked function imports A. And is used as entry point for 
description. 
2. x:function element or alternative (xsl:*) is supported on top level. 
x:variable and x:param are similary supported at the moment.

Solution 1 could work even now but it produces lot of additional files that 
makes tests unreadable

Solution 2 allow quick in-place mocking. 

Drawbacks:
x:import becomes unusable in case when 2 different descriptions have different 
mocks of function or template. However any x:variables or x:param becomes 
unusable if import is used.

Is it possible to add this feature into xspec? I could provide patch with 
changes to support it.

Thanks


Original issue reported on code.google.com by [email protected] on 3 May 2012 at 4:31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant