Mercurial > repos > IBBoard.Tests
view Lang/ModifiableTranslationSetTest.cs @ 21:2834da2b8891
Re #35: Add multi-level cascading of translations
* Add tests of "parent language" property
* Move some test values to constants instead of abstract methods
Also:
* Fix warning about tests not being executable because they're on an abstract class by not marking abstract class as a test fixture
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 07 Apr 2010 19:36:08 +0000 |
parents | 20189f3a3479 |
children | e9bad86c1360 |
line wrap: on
line source
// This file (ModifiableTranslationSetTest.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 ModifiableTranslationSetTest : AbstractTranslationSetTest { protected override AbstractTranslationSet GetTranslationSet(string language) { return new ModifiableTranslationSet(language); } protected override AbstractTranslationSet GetTranslationSetWithInheritance(string language, string parentLanguage) { ModifiableTranslationSet translations = new ModifiableTranslationSet(language); translations.SetTranslation(TEST_KEY, TEST_VALUE); ModifiableTranslationSet parentTranslations = new ModifiableTranslationSet(parentLanguage); parentTranslations.SetTranslation(INHERITED_KEY, INHERITED_VALUE); translations.SetParentTranslations(parentTranslations); return translations; } protected override AbstractTranslationSet GetTranslationSetWithFixedValue() { ModifiableTranslationSet translations = new ModifiableTranslationSet("en"); translations.SetTranslation(TEST_KEY, TEST_VALUE); return translations; } } }