@Test public void testTargetObjectWithSingleAttribute() { assertEquals(0L, support.dataStoreSize()); TargetObject target = ModelFactory.eINSTANCE.createTargetObject(); target.setId(1); target.setSingleAttribute("foo"); support.saveObject(target); assertEquals(3L, support.dataStoreSize()); support.checkObject(target); }
@Test public void testTargetObjectWithArrayAttribute() { assertEquals(0L, support.dataStoreSize()); TargetObject target = ModelFactory.eINSTANCE.createTargetObject(); target.setId(2); target.getArrayAttribute().add("one"); target.getArrayAttribute().add("two"); support.saveObject(target); assertEquals(4L, support.dataStoreSize()); support.checkObject(target); }
@Test public void testTargetObjectUpdateSingleAttribute() throws IOException { assertEquals(0L, support.dataStoreSize()); TargetObject target = ModelFactory.eINSTANCE.createTargetObject(); target.setId(3); target.setSingleAttribute("foo"); support.saveObject(target); assertEquals(3L, support.dataStoreSize()); target.setSingleAttribute("bar"); target.eResource().save(null); assertEquals(3L, support.dataStoreSize()); support.checkObject(target); }