1 // Copyright 2004-2007 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
.IronView
.Tests
19 using NUnit
.Framework
;
22 public class ViewParserTestCase
25 public void CreateScripts()
27 // ViewParser parser = new ViewParser();
29 // String[] files = Directory.GetFiles("../../ViewsToTest", "*.py");
31 // foreach(String file in files)
33 // String resultFileName =
34 // Path.Combine(Path.GetDirectoryName(file),
35 // String.Format("{0}-result.txt", Path.GetFileNameWithoutExtension(file)));
37 // using(StreamReader reader = new StreamReader(file))
39 // String result = parser.CreateScriptFromFile(reader, file);
41 // // Debug.WriteLine(result);
42 // Console.WriteLine(result);
44 // AssertResultEqualsToResultFileContent(result, resultFileName);
49 private void AssertResultEqualsToResultFileContent(string script
, string resultFileName
)
51 using(StreamReader reader
= new StreamReader(resultFileName
))
53 String fileContent
= reader
.ReadToEnd();
55 Assert
.AreEqual(fileContent
, script
, "Resulting script should be equal");