use of com.fanap.podchat.util.DataTypeConverter in project pod-chat-android-sdk by FanapSoft.
the class ExampleUnitTest method converters.
@Test
public void converters() {
String s = "[\"thread_admin\",\"add_new_user\",\"remove_user\"]";
// String s = "[role1,role2,role3,role4]";
DataTypeConverter dataTypeConverter = new DataTypeConverter();
List<String> lst = new ArrayList<>();
lst.add("thread_admin");
lst.add("add_new_user");
lst.add("remove_user");
System.out.println(s);
System.out.println(lst.toString());
System.out.println("***");
System.out.println(dataTypeConverter.dataToList(s));
System.out.println(dataTypeConverter.convertListToString(lst));
assertEquals(lst, dataTypeConverter.dataToList(s));
assertEquals(s, dataTypeConverter.convertListToString(lst));
}
Aggregations