Example #1
0
        public void IndexOfTest()
        {
            var fileidString = string.Empty;
            var list         = new FileIdList(fileidString, (s) => fileidString = s)
            {
                "Test1",
                "Test2"
            };

            Assert.AreEqual(1, list.IndexOf("Test2"));
        }
Example #2
0
        public void ContainsTest()
        {
            var fileidString = string.Empty;
            var list         = new FileIdList(fileidString, (s) => fileidString = s)
            {
                "Test1",
                "Test2"
            };

            Assert.IsTrue(list.Contains("Test2"));
        }
Example #3
0
        public void AddTest()
        {
            var fileidString = string.Empty;
            var list         = new FileIdList(fileidString, (s) => fileidString = s)
            {
                "Test1",
                "Test2"
            };

            Assert.AreEqual("Test1|Test2", fileidString);
        }
Example #4
0
        public void ClearTest()
        {
            var fileidString = string.Empty;
            var list         = new FileIdList(fileidString, (s) => fileidString = s)
            {
                "Test1",
                "Test2"
            };

            list.Clear();
            Assert.AreEqual(string.Empty, fileidString);
        }
Example #5
0
        public void CopyToTest()
        {
            var fileidString = string.Empty;
            var list         = new FileIdList(fileidString, (s) => fileidString = s)
            {
                "Test1",
                "Test2"
            };
            var array = new string[2];

            list.CopyTo(array, 0);

            Assert.AreEqual("Test1", array[0]);
            Assert.AreEqual("Test2", array[1]);
        }