use of com.orientechnologies.orient.core.record.impl.OBlob in project orientdb by orientechnologies.
the class CRUDObjectPhysicalTest method testOrphanDelete.
@Test(dependsOnMethods = "testObjectDelete")
public void testOrphanDelete() {
Media media = new Media();
OBlob testRecord = new ORecordBytes("This is a test".getBytes());
media.setContent(testRecord);
media = database.save(media);
Assert.assertEquals(new String(media.getContent().toStream()), "This is a test");
// try to delete
database.delete(media);
}
use of com.orientechnologies.orient.core.record.impl.OBlob in project orientdb by orientechnologies.
the class CRUDObjectPhysicalTestSchemaFull method testObjectDelete.
@Test(dependsOnMethods = "testAddingORecordBytesAfterParentCreation")
public void testObjectDelete() {
Media media = new Media();
OBlob testRecord = new ORecordBytes("This is a test".getBytes());
media.setContent(testRecord);
media = database.save(media);
Assert.assertEquals(new String(media.getContent().toStream()), "This is a test");
// try to delete
database.delete(media);
}
Aggregations