Ejemplo n.º 1
0
		public void MergeWithOverlap()
		{
			MultiTextBase old = new MultiTextBase();
			old["a"] = "alpha";
			old["b"] = "beta";
			MultiTextBase newGuy = new MultiTextBase();
			newGuy["b"] = "newbeta";
			newGuy["c"] = "charlie";
			old.MergeIn(newGuy);
			Assert.AreEqual(3, old.Count);
			Assert.AreEqual("newbeta", old["b"]);
		}
Ejemplo n.º 2
0
		public void Equals_SameContent_True()
		{
			MultiTextBase x = new MultiTextBase();
			x["ws"] = "test";
			MultiTextBase y = new MultiTextBase();
			y.MergeIn(x);
			Assert.IsTrue(x.Equals(y));
			Assert.IsTrue(y.Equals(x));
		}
Ejemplo n.º 3
0
		public void MergeWithEmpty()
		{
			MultiTextBase old = new MultiTextBase();
			MultiTextBase newGuy = new MultiTextBase();
			old.MergeIn(newGuy);
			Assert.AreEqual(0, old.Count);

			old = new MultiTextBase();
			old["a"] = "alpha";
			old.MergeIn(newGuy);
			Assert.AreEqual(1, old.Count);
		}