view Lang/TranslationXmlLoaderTest.cs @ 16:c21d27a9cae5

Re #31: Break out Translations for language to own class * Add initial tests for loader of new translation class
author IBBoard <dev@ibboard.co.uk>
date Tue, 06 Apr 2010 16:01:29 +0000
parents
children 948317c89fad
line wrap: on
line source

// This file (TranslationXmlLoader.cs) is a part of the IBBoard.Tests project and is copyright 2010 IBBoard
// 
// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.

using System;
using NUnit.Framework;

namespace IBBoard.Lang
{
	[TestFixture()]
	public class TranslationXmlLoaderTest
	{
		[Test()]
		public void TestLoadOfSimpleXml()
		{
			TranslationXmlLoader loader = new TranslationXmlLoader("test-data/schemas/translation.xsd");
			AbstractTranslationSet translations = loader.LoadTranslations("test-data/translations/en.translation");
			Assert.AreEqual("en", translations.LanguageCode);
			Assert.AreEqual("Test String", translations["testString"]);			
		}
	}
}