Minor changes to improve testability of helpers
[castle.git] / MonoRail / Castle.MonoRail.Framework.Tests / TransformFilterTestCase.cs
blobd863071119d6d3effa236f0b95edbba655bb7b71
1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.MonoRail.Framework.Tests
17 using NUnit.Framework;
19 [TestFixture]
20 public class TransformFilterTestCase : AbstractTestCase
22 [Test]
23 public void UppercaseFilter()
25 DoGet("TransformFiltered/ToUpperCase.rails");
27 AssertSuccess();
29 AssertReplyEqualTo("THIS IS NOT A LOWERCASE STRING");
32 [Test]
33 public void MarkdownFilter()
35 DoGet("TransformFiltered/Markdown.rails");
37 AssertSuccess();
39 string expected = "<p>This is <a href=\"http://example.com/\" title=\"Title\">an example</a> inline link.</p>" + "\n\n" +
40 "<p><a href=\"http://example.net/\">This link</a> has no title attribute.</p>" + "\n";
42 AssertReplyEqualTo(expected);
45 [Test]
46 public void WikiFilter()
48 DoGet("TransformFiltered/Wiki.rails");
50 AssertSuccess();
52 string expected = "<table><caption><b>wiki's are really nice</b></caption><tr><td><i>and so is castle</i></td></tr></table>\n";
54 AssertReplyEqualTo(expected);
57 [Test]
58 public void ExecutingOrder()
60 DoGet("TransformFiltered/ExecutingOrder.rails");
62 AssertSuccess();
64 string expected = "THIS IS NOT A LOWERCASE STRING";
66 AssertReplyEqualTo(expected);