Mercurial > repos > IBBoard.Tests
comparison 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 |
comparison
equal
deleted
inserted
replaced
15:e3e4f7a92f8b | 16:c21d27a9cae5 |
---|---|
1 // This file (TranslationXmlLoader.cs) is a part of the IBBoard.Tests project and is copyright 2010 IBBoard | |
2 // | |
3 // 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. | |
4 | |
5 using System; | |
6 using NUnit.Framework; | |
7 | |
8 namespace IBBoard.Lang | |
9 { | |
10 [TestFixture()] | |
11 public class TranslationXmlLoaderTest | |
12 { | |
13 [Test()] | |
14 public void TestLoadOfSimpleXml() | |
15 { | |
16 TranslationXmlLoader loader = new TranslationXmlLoader("test-data/schemas/translation.xsd"); | |
17 AbstractTranslationSet translations = loader.LoadTranslations("test-data/translations/en.translation"); | |
18 Assert.AreEqual("en", translations.LanguageCode); | |
19 Assert.AreEqual("Test String", translations["testString"]); | |
20 } | |
21 } | |
22 } |