// Copyright (c) 2007 Omer Rauchwerger (a.k.a rauchy) (omer@rauchy.net) // All rights reserved. // // This file is part of Regionerate. // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, // or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . using System.Xml; using NUnit.Framework; namespace BestBrains.System { [ TestFixture ] public class CommentReaderTest { #region Methods (2) /// /// create table Orders ( id int, customer int ); /// [ Test ] public void TestNonXmlComment() { string content = CommentReader.GetElement( "sample" ); Assert.AreEqual( @"create table Orders ( id int, customer int );", content.Trim() ); } /// /// /// 1234-1234 /// Code Complete /// /// [ Test ] public void TestXmlComment() { string content = CommentReader.GetElement( "sample" ); XmlDocument document = new XmlDocument(); document.LoadXml( content ); Assert.AreEqual( @"Code Complete", document.SelectSingleNode( "//book/title" ).InnerText ); } #endregion } }