Search in sources :

Example 6 with UpdatableDocumentWithMapsView

use of com.blazebit.persistence.view.testsuite.update.subview.simple.mutable.model.UpdatableDocumentWithMapsView in project blaze-persistence by Blazebit.

the class EntityViewUpdateSimpleMutableSubviewMapsTest method testUpdateAddToCollectionAndModify.

@Test
public void testUpdateAddToCollectionAndModify() {
    // Given
    final UpdatableDocumentWithMapsView docView = getDoc1View();
    UpdatablePersonView newPerson = getP2View(UpdatablePersonView.class);
    clearQueries();
    // When
    newPerson.setName("newPerson");
    docView.getContacts().put(2, newPerson);
    verifyUpdateAddToCollectionAndModify(docView);
}
Also used : UpdatablePersonView(com.blazebit.persistence.view.testsuite.update.subview.simple.mutable.model.UpdatablePersonView) UpdatableDocumentWithMapsView(com.blazebit.persistence.view.testsuite.update.subview.simple.mutable.model.UpdatableDocumentWithMapsView) Test(org.junit.Test) AbstractEntityViewUpdateDocumentTest(com.blazebit.persistence.view.testsuite.update.AbstractEntityViewUpdateDocumentTest)

Aggregations

AbstractEntityViewUpdateDocumentTest (com.blazebit.persistence.view.testsuite.update.AbstractEntityViewUpdateDocumentTest)6 UpdatableDocumentWithMapsView (com.blazebit.persistence.view.testsuite.update.subview.simple.mutable.model.UpdatableDocumentWithMapsView)6 Test (org.junit.Test)6 UpdatablePersonView (com.blazebit.persistence.view.testsuite.update.subview.simple.mutable.model.UpdatablePersonView)5 AssertStatementBuilder (com.blazebit.persistence.testsuite.base.jpa.assertion.AssertStatementBuilder)4 Document (com.blazebit.persistence.testsuite.entity.Document)4 Person (com.blazebit.persistence.testsuite.entity.Person)2 HashMap (java.util.HashMap)1