public void ConvertToIdsTest() { List <int> ids_list = new List <int>(); { ids_list.Add(100); ids_list.Add(200); ids_list.Add(300); } int[] ids_array = { 100, 200, 300 }; List <Model> models = new List <Model>(); for (int i = 1; i <= 3; i++) { Model model = new Model(); model.Id = i * 100; models.Add(model); } string expected = "100,200,300"; string actual_list = TSUtil.ConvertToIds(ids_list); string actual_array = TSUtil.ConvertToIds(ids_array); Assert.AreEqual(expected, actual_list); Assert.AreEqual(expected, actual_array); }
public String GetUserIds() { return(TSUtil.ConvertToIds(Users)); }