Esempio n. 1
0
        public void Test3B()
        {
            string[] s = { "0", "1", "2", "3", "4" };
            DelimitedArray <string> del = new DelimitedArray <string>(s, 1, 3);

            // Should error since there is no element at index 3 in a 3 element array.
            string single = del[3];
        }
Esempio n. 2
0
        public void ToArrayTest1()
        {
            string[] s = { "0", "1", "2", "3", "4" };
            DelimitedArray <string> del = new DelimitedArray <string>(s, 1, 3);

            string[] newS = del.ToArray();
            Assert.AreEqual(3, newS.Length);
        }
Esempio n. 3
0
        public void Test1B()
        {
            string[] s = { "0", "1", "2", "3", "4" };
            DelimitedArray <string> del = new DelimitedArray <string>(s, 1, 1);

            // Make sure enumerating works and doesn't error.
            foreach (string s1 in del)
            {
            }

            Assert.AreEqual(1, del.Count);
            Assert.AreEqual("1", del[0]);
        }
Esempio n. 4
0
 public void Test3C()
 {
     string[] s = { "0", "1", "2", "3", "4" };
     // Should error since count would go one element beyond the end of the array.
     DelimitedArray <string> del = new DelimitedArray <string>(s, 4, 2);
 }