Created
October 8, 2016 15:43
-
-
Save eerohele/6839e849710d6aaa0f8c2ec56b469cc9 to your computer and use it in GitHub Desktop.
Unit testing XSLT with F#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open XSLTUnit | |
[<TestFixture>] | |
type ``Testing XSLT with F#``() = | |
inherit XSLTUnit(Uri(@"C:\TEMP\test.xsl")) | |
[<Test>] | |
member xsl.``Applying a template with a tunnel template parameter in the default mode``() = | |
xsl.Apply("""<input attribute="1"/>""", parameters = parameters Template true [(QName("number"), 42)]) | |
|> should produce """<output attribute="42"/>""" | |
[<Test>] | |
member xsl.``Selecting a context node, applying the template for that node, and checking whether the result matches an XPath expression``() = | |
DocumentNode """<a b="c"/>""" | |
|> XPath.selectNode("a/@b") | |
|> xsl.Apply | |
|> should beMatching "d[empty(*)]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment