AddRange() public method

public AddRange ( CodeAttributeArgument value ) : void
value CodeAttributeArgument
return void
		public void Constructor1_Deny_Unrestricted ()
		{
			CodeAttributeArgumentCollection coll = new CodeAttributeArgumentCollection (array);
			coll.CopyTo (array, 0);
			Assert.AreEqual (1, coll.Add (caa), "Add");
			Assert.AreSame (caa, coll[0], "this[int]");
			coll.AddRange (array);
			coll.AddRange (coll);
			Assert.IsTrue (coll.Contains (caa), "Contains");
			Assert.AreEqual (0, coll.IndexOf (caa), "IndexOf");
			coll.Insert (0, caa);
			coll.Remove (caa);
		}
		public void AddRange_Self ()
		{
			CodeAttributeArgumentCollection coll = new CodeAttributeArgumentCollection ();
			coll.Add (new CodeAttributeArgument ());
			Assert.AreEqual (1, coll.Count, "#1");
			coll.AddRange (coll);
			Assert.AreEqual (2, coll.Count, "#2");
		}
		public void AddRange_Null_Item ()
		{
			CodeAttributeArgumentCollection coll = new CodeAttributeArgumentCollection ();
			coll.AddRange (new CodeAttributeArgument[] { null });
		}
		public void AddRange_Null_Collection ()
		{
			CodeAttributeArgumentCollection coll = new CodeAttributeArgumentCollection ();
			coll.AddRange ((CodeAttributeArgumentCollection) null);
		}
		public void AddRange ()
		{
			CodeAttributeArgument caa1 = new CodeAttributeArgument ();
			CodeAttributeArgument caa2 = new CodeAttributeArgument ();
			CodeAttributeArgument caa3 = new CodeAttributeArgument ();

			CodeAttributeArgumentCollection coll1 = new CodeAttributeArgumentCollection ();
			coll1.Add (caa1);
			coll1.Add (caa2);

			CodeAttributeArgumentCollection coll2 = new CodeAttributeArgumentCollection();
			coll2.Add (caa3);
			coll2.AddRange (coll1);
			Assert.AreEqual (3, coll2.Count, "#1");
			Assert.AreEqual (1, coll2.IndexOf (caa1), "#2");
			Assert.AreEqual (2, coll2.IndexOf (caa2), "#3");
			Assert.AreEqual (0, coll2.IndexOf (caa3), "#4");

			CodeAttributeArgumentCollection coll3 = new CodeAttributeArgumentCollection();
			coll3.Add (caa3);
			coll3.AddRange (new CodeAttributeArgument[] {caa1, caa2});
			Assert.AreEqual (3, coll2.Count, "#5");
			Assert.AreEqual (1, coll2.IndexOf (caa1), "#6");
			Assert.AreEqual (2, coll2.IndexOf (caa2), "#7");
			Assert.AreEqual (0, coll2.IndexOf (caa3), "#8");
		}