Example #1
0
        public virtual void TestCopyLeadingPrefix()
        {
            RefList <Ref> one = ToList(REF_A, REF_B, REF_c);
            RefList <Ref> two = one.Copy(2).ToRefList();

            NUnit.Framework.Assert.AreNotSame(one, two);
            NUnit.Framework.Assert.AreEqual(3, one.Size());
            NUnit.Framework.Assert.AreSame(REF_A, one.Get(0));
            NUnit.Framework.Assert.AreSame(REF_B, one.Get(1));
            NUnit.Framework.Assert.AreSame(REF_c, one.Get(2));
            NUnit.Framework.Assert.AreEqual(2, two.Size());
            NUnit.Framework.Assert.AreSame(REF_A, two.Get(0));
            NUnit.Framework.Assert.AreSame(REF_B, two.Get(1));
        }