private Iterable<SchemaEntry> schemaEntriesFromStr(String entriesStr) { return RepositoryUtil.schemasFromString(entriesStr); }
private Iterable<SchemaEntry> schemaEntriesFromStr(String entriesStr) { return RepositoryUtil.schemasFromString(entriesStr); }
@Test public void testSchemasToFromString() { SchemaEntry e1 = new SchemaEntry("id1", "s1"); SchemaEntry e2 = new SchemaEntry("id2", "s2"); ArrayList<SchemaEntry> empty = new ArrayList<SchemaEntry>(); ArrayList<SchemaEntry> vals = new ArrayList<SchemaEntry>(); vals.add(e1); vals.add(e2); Iterable<SchemaEntry> emptyResult = RepositoryUtil .schemasFromString(RepositoryUtil.schemasToString(empty)); Iterable<SchemaEntry> emptyResult2 = RepositoryUtil.schemasFromString(null); Iterable<SchemaEntry> emptyResult3 = RepositoryUtil.schemasFromString(""); Assert.assertEquals(empty, emptyResult); Assert.assertEquals(emptyResult, emptyResult2); Assert.assertEquals(emptyResult, emptyResult3); Iterable<SchemaEntry> result = RepositoryUtil .schemasFromString(RepositoryUtil.schemasToString(vals)); Assert.assertEquals(vals, result); }