private void update( RelationshipGroupRecord record ) { resolveNeoStores().getRelationshipGroupStore().updateRecord( record ); }
@Test public void shouldApplyRelationshipGroupCommandToTheStoreInRecovery() throws Exception { // given final BatchTransactionApplier applier = newApplier( true ); // when final RelationshipGroupRecord before = new RelationshipGroupRecord( 42, 1 ); final RelationshipGroupRecord after = new RelationshipGroupRecord( 42, 1, 2, 3, 4, 5, 6, true ); final Command command = new Command.RelationshipGroupCommand( before, after ); boolean result = apply( applier, command::handle, transactionToApply ); // then assertFalse( result ); verify( relationshipGroupStore, times( 1 ) ).setHighestPossibleIdInUse( after.getId() ); verify( relationshipGroupStore, times( 1 ) ).updateRecord( after ); }
@Test public void shouldApplyRelationshipGroupCommandToTheStore() throws Exception { // given final BatchTransactionApplier applier = newApplier( false ); // when final RelationshipGroupRecord before = new RelationshipGroupRecord( 42, 1 ); final RelationshipGroupRecord after = new RelationshipGroupRecord( 42, 1, 2, 3, 4, 5, 6, true ); final Command command = new Command.RelationshipGroupCommand( before, after ); final boolean result = apply( applier, command::handle, transactionToApply ); // then assertFalse( result ); verify( relationshipGroupStore, times( 1 ) ).updateRecord( after ); }