Added non-generic registration interface to IKernel and IWindsor to accommodate dynam...
[castle.git] / MonoRail / Castle.MonoRail.Views.Brail.Tests / JustViewFixture.cs
blob367c79093679379e2be606fdfef3a832be930de8
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.Views.Brail.Tests
17 using System.Collections;
18 using NUnit.Framework;
20 [TestFixture]
21 public class JustViewFixture : BaseViewOnlyTestFixture
23 [Test]
24 public void CanRenderViewWithoutUsingFullMonoRailPipeline()
26 string outpot = ProcessView("home/index");
27 Assert.AreEqual("Brail is wonderful", outpot);
30 [Test]
31 public void UsingExtentionMethods()
33 IDictionary dictionary = new Hashtable();
34 dictionary["items"] = new int[] {};
35 string templatePath = "home/extensionMethods";
37 string actual = ProcessView(dictionary, templatePath);
38 Assert.AreEqual("No Data", actual);
42 [Test]
43 public void WithParameters()
45 IDictionary dictionary = new Hashtable();
46 dictionary["list"] = new int[] {2, 5, 7, 8};
47 dictionary["name"] = "test";
48 string templatePath = "home/bag";
50 string actual = ProcessView(dictionary, templatePath);
51 string expected = @"test is the name
57 Assert.AreEqual(expected, actual);