1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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
.Views
.Brail
.Tests
17 using Castle
.MonoRail
.Views
.Brail
.TestSite
.Controllers
;
18 using NUnit
.Framework
;
21 public class BrailBugsTestCase
: BaseViewOnlyTestFixture
24 public void MR_233_TagInDoubleQuotes()
26 PropertyBag
["page_id"] = 123;
27 ProcessView_StripRailsExtension("bugs/mr_233.rails");
28 AssertReplyEqualTo("<body id=\"123\">");
32 public void ScriptWithNoTempatingCode()
34 ProcessView_StripRailsExtension("bugs/no_code.rails");
35 AssertReplyEqualTo(@"<html>
43 public void MR_294_CaptureForInSubViewDoesNotPropogateUpward()
45 ProcessView_StripRailsExtension("bugs/MR_294_CaptureForInSubViewDoesNotPropogateUpward.rails");
46 AssertReplyEqualTo("ayende");
50 public void MR_371_OutputComponentInSectionTooManyTimes()
52 ViewComponentFactory
.Inspect(typeof(BugsController
).Assembly
);
53 ProcessView_StripRailsExtension("bugs/mr_371.rails");
54 AssertReplyEqualTo("123ayende 0<br/>123ayende 1<br/>123ayende 2<br/>");
58 public void MR_262_DynamicComponents()
60 ViewComponentFactory
.Inspect(typeof(BugsController
).Assembly
);
61 PropertyBag
["components"] = new string[]
63 "SimpleInlineViewComponent3",
64 "SimpleInlineViewComponent2"
66 ProcessView_StripRailsExtension("usingcomponents/DynamicComponents.rails");
67 AssertReplyEqualTo("default component view picked up automaticallyThis is a view used by a component");
71 public void MR_285_ViewName_Is_Reserved_CompilerKeyword()
73 ProcessView_StripRailsExtension("bugs/add.rails");
74 AssertReplyContains("Success");
79 public void MR_299_Inline_SubView()
81 ProcessView_StripRailsExtension("bugs/inlineSubView.rails");
82 AssertReplyContains("Success");
86 public void MS_378_AccessingIndexers()
88 PropertyBag
["Data"] = new Data();
89 ProcessView("bugs/mr_378");
94 public string[] array
= new string[] { "one", "two", "three" }
;