Пример #1
0
        public void UniqueFail()
        {
            object    x  = new object();
            ArrayList al = new ArrayList();

            al.Add(x);
            al.Add(new object());
            al.Add(x);

            OldCollectionAssert.AllItemsAreUnique(al);
        }
Пример #2
0
        public void UniqueFailMsgParam()
        {
            object    x  = new object();
            ArrayList al = new ArrayList();

            al.Add(x);
            al.Add(new object());
            al.Add(x);

            OldCollectionAssert.AllItemsAreUnique(al, "test {0}", "1");
        }
Пример #3
0
        public void Unique()
        {
            ArrayList al = new ArrayList();

            al.Add(new object());
            al.Add(new object());
            al.Add(new object());

            OldCollectionAssert.AllItemsAreUnique(al);
            OldCollectionAssert.AllItemsAreUnique(al, "test");
            OldCollectionAssert.AllItemsAreUnique(al, "test {0}", "1");

            al = new ArrayList();
            al.Add("x");
            al.Add("y");
            al.Add("z");

            OldCollectionAssert.AllItemsAreUnique(al);
            OldCollectionAssert.AllItemsAreUnique(al, "test");
            OldCollectionAssert.AllItemsAreUnique(al, "test {0}", "1");
        }