Esempio n. 1
0
        public void ItemsOfTypeFailNoMsg()
        {
            ArrayList al = new ArrayList();

            al.Add("x");
            al.Add("y");
            al.Add(new object());
            OldCollectionAssert.AllItemsAreInstancesOfType(al, typeof(string));
        }
Esempio n. 2
0
        public void ItemsOfType()
        {
            ArrayList al = new ArrayList();

            al.Add("x");
            al.Add("y");
            al.Add("z");
            OldCollectionAssert.AllItemsAreInstancesOfType(al, typeof(string));
            OldCollectionAssert.AllItemsAreInstancesOfType(al, typeof(string), "test");
            OldCollectionAssert.AllItemsAreInstancesOfType(al, typeof(string), "test {0}", "1");

            al = new ArrayList();
            al.Add(new DataSet());
            al.Add(new DataSet());
            al.Add(new DataSet());
            OldCollectionAssert.AllItemsAreInstancesOfType(al, typeof(DataSet));
            OldCollectionAssert.AllItemsAreInstancesOfType(al, typeof(DataSet), "test");
            OldCollectionAssert.AllItemsAreInstancesOfType(al, typeof(DataSet), "test {0}", "1");
        }