示例#1
0
		public void CompareTo_OtherHasFewerEntries_ReturnsGreater()
		{
			OptionRefCollection reference = new OptionRefCollection(this);
			reference.Add("key1");
			OptionRefCollection other = new OptionRefCollection(this);
			Assert.AreEqual(1, reference.CompareTo(other));
		}
示例#2
0
		public void CompareTo_OtherHasMoreEntries_ReturnsLess()
		{
			OptionRefCollection reference = new OptionRefCollection(this);
			OptionRefCollection other = new OptionRefCollection(this);
			other.Add("key2");
			Assert.AreEqual(-1, reference.CompareTo(other));
		}
示例#3
0
		public void CompareTo_OtherHassameListEntries_ReturnsEqual()
		{
			OptionRefCollection reference = new OptionRefCollection(this);
			reference.Add("key1");
			OptionRefCollection other = new OptionRefCollection(this);
			other.Add("key1");
			Assert.AreEqual(0, reference.CompareTo(other));
		}
示例#4
0
		public void CompareTo_OtherHasEntrythatIsAlphabeticallyLater_ReturnsLess()
		{
			OptionRefCollection reference = new OptionRefCollection(this);
			reference.Add("key1");
			OptionRefCollection other = new OptionRefCollection(this);
			other.Add("key2");
			Assert.AreEqual(-1, reference.CompareTo(other));
		}
示例#5
0
		public void CompareTo_Null_ReturnsGreater()
		{
			OptionRefCollection reference = new OptionRefCollection(this);
			Assert.AreEqual(1, reference.CompareTo(null));
		}