public void IndexOfTest() { var fileidString = string.Empty; var list = new FileIdList(fileidString, (s) => fileidString = s) { "Test1", "Test2" }; Assert.AreEqual(1, list.IndexOf("Test2")); }
public void ContainsTest() { var fileidString = string.Empty; var list = new FileIdList(fileidString, (s) => fileidString = s) { "Test1", "Test2" }; Assert.IsTrue(list.Contains("Test2")); }
public void AddTest() { var fileidString = string.Empty; var list = new FileIdList(fileidString, (s) => fileidString = s) { "Test1", "Test2" }; Assert.AreEqual("Test1|Test2", fileidString); }
public void ClearTest() { var fileidString = string.Empty; var list = new FileIdList(fileidString, (s) => fileidString = s) { "Test1", "Test2" }; list.Clear(); Assert.AreEqual(string.Empty, fileidString); }
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]); }