view Lang/ModifiableTranslationSetTest.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 e3e4f7a92f8b
children 20189f3a3479
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
	{
		private const string TEST_ID = "testString";
		
		protected override string GetFixedValueKey()
		{
			return TEST_ID;
		}
		
		protected override string GetFixedValueTranslation()
		{
			return "new string";
		}
		
		protected override AbstractTranslationSet GetTranslationSet()
		{
			return new ModifiableTranslationSet("en");
		}
		
		protected override AbstractTranslationSet GetTranslationSetWithFixedValue()
		{
			ModifiableTranslationSet translations = new ModifiableTranslationSet("en");
			translations.SetTranslation(GetFixedValueKey(), GetFixedValueTranslation());
			return translations;
		}
	}
}