use of org.eclipse.tycho.p2.impl.repo.MetadataSerializableImpl in project tycho by eclipse.
the class MetadataSerializableImplTest method testSerializeAndLoad.
@Test
public void testSerializeAndLoad() throws IOException, ProvisionException, OperationCanceledException {
File tmpDir = createTempDir("repo");
try {
Set<IInstallableUnit> units = new HashSet<>(Arrays.asList(InstallableUnitUtil.createIU("org.example.test", "1.0.0")));
MetadataSerializableImpl subject = new MetadataSerializableImpl();
serialize(subject, units, tmpDir);
Assert.assertEquals(units, deserialize(tmpDir));
} finally {
deleteRecursive(tmpDir);
}
}
use of org.eclipse.tycho.p2.impl.repo.MetadataSerializableImpl in project tycho by eclipse.
the class MetadataSerializableImplTest method testSerializeAndLoadWithEmptyIUList.
@Test
public void testSerializeAndLoadWithEmptyIUList() throws IOException, ProvisionException, OperationCanceledException {
File tmpDir = createTempDir("repo");
try {
Set<IInstallableUnit> units = new HashSet<>();
MetadataSerializableImpl subject = new MetadataSerializableImpl();
serialize(subject, units, tmpDir);
Assert.assertEquals(units, deserialize(tmpDir));
} finally {
deleteRecursive(tmpDir);
}
}
Aggregations