예제 #1
0
		public void CompareTo_IdenticalMultiText_ReturnsEqual()
		{
			MultiTextBase multiTextBase = new MultiTextBase();
			multiTextBase.SetAlternative("de", "Word 1");
			MultiTextBase multiTextBaseToCompare = new MultiTextBase();
			multiTextBaseToCompare.SetAlternative("de", "Word 1");
			Assert.AreEqual(0, multiTextBase.CompareTo(multiTextBaseToCompare));
		}
예제 #2
0
		public void CompareTo_MultiTextWithNonIdenticalFormsAndFirstNonidenticalformIsAlphabeticallyLater_ReturnsLess()
		{
			MultiTextBase multiTextBase = new MultiTextBase();
			multiTextBase.SetAlternative("de", "Word 1");
			MultiTextBase multiTextBaseToCompare = new MultiTextBase();
			multiTextBaseToCompare.SetAlternative("de", "Word 2");
			Assert.AreEqual(-1, multiTextBase.CompareTo(multiTextBaseToCompare));
		}
예제 #3
0
		public void CompareTo_MultiTextWithMoreForms_ReturnsLess()
		{
			MultiTextBase multiTextBase = new MultiTextBase();
			MultiTextBase multiTextBaseToCompare = new MultiTextBase();
			multiTextBaseToCompare.SetAlternative("de", "Word 1");
			Assert.AreEqual(-1, multiTextBase.CompareTo(multiTextBaseToCompare));
		}
예제 #4
0
		public void CompareTo_MultiTextWithNonIdenticalWritingSystemsAndFirstNonidenticalWritingSystemIsAlphabeticallyEarlier_ReturnsGreater()
		{
			MultiTextBase multiTextBase = new MultiTextBase();
			multiTextBase.SetAlternative("en", "Word 1");
			MultiTextBase multiTextBaseToCompare = new MultiTextBase();
			multiTextBaseToCompare.SetAlternative("de", "Word 1");
			Assert.AreEqual(1, multiTextBase.CompareTo(multiTextBaseToCompare));
		}
예제 #5
0
		public void CompareTo_MultiTextWithFewerForms_ReturnsGreater()
		{
			MultiTextBase multiTextBase = new MultiTextBase();
			multiTextBase.SetAlternative("de", "Word 1");
			MultiTextBase multiTextBaseToCompare = new MultiTextBase();
			Assert.AreEqual(1, multiTextBase.CompareTo(multiTextBaseToCompare));
		}