#304 - ElasticSearch integration part 1 / doc store integration

This commit is contained in:
Robin Bygrave committed 2016-03-01 15:36:44 +13:00
1 parent cb1fe297d6
commit 8d3b4a0407
209 files changed
+6736 -573

No files matched your search

@@ -2,6 +2,8 @@ package com.avaje.tests.batchload;
import java.util.List;
import com.avaje.ebean.bean.EntityBean;
import com.avaje.ebean.bean.EntityBeanIntercept;
import org.junit.Assert;
import org.junit.Test;
@@ -35,6 +37,15 @@ public class TestLoadOnDirty extends BaseTestCase {
Assert.assertTrue(beanState.getChangedProps().contains("name"));
Assert.assertEquals(1, beanState.getChangedProps().size());
EntityBeanIntercept ebi = ((EntityBean) customer)._ebean_getIntercept();
boolean[] dirtyProperties = ebi.getDirtyProperties();
for (int i = 0; i < dirtyProperties.length; i++) {
if (dirtyProperties[i]) {
String dirtyPropertyName = ebi.getProperty(i);
Assert.assertEquals("name", dirtyPropertyName);
}
}
customer.setStatus(Customer.Status.INACTIVE);
Assert.assertTrue(beanState.isDirty());