use of org.neo4j.kernel.impl.transaction.command.Command.RelationshipTypeTokenCommand in project neo4j by neo4j.
the class NeoStoreTransactionApplierTest method shouldApplyRelationshipTypeTokenCommandToTheStore.
// RELATIONSHIP TYPE TOKEN COMMAND
@Test
public void shouldApplyRelationshipTypeTokenCommandToTheStore() throws Exception {
// given
final BatchTransactionApplier applier = newApplier(false);
final RelationshipTypeTokenRecord before = new RelationshipTypeTokenRecord(42);
final RelationshipTypeTokenRecord after = new RelationshipTypeTokenRecord(42);
after.setInUse(true);
after.setNameId(323);
final Command command = new RelationshipTypeTokenCommand(before, after);
// when
boolean result = apply(applier, command::handle, transactionToApply);
// then
assertFalse(result);
verify(relationshipTypeTokenStore, times(1)).updateRecord(after);
}
use of org.neo4j.kernel.impl.transaction.command.Command.RelationshipTypeTokenCommand in project neo4j by neo4j.
the class Commands method createRelationshipTypeToken.
public static RelationshipTypeTokenCommand createRelationshipTypeToken(int id, int nameId) {
RelationshipTypeTokenRecord before = new RelationshipTypeTokenRecord(id);
RelationshipTypeTokenRecord after = new RelationshipTypeTokenRecord(id);
populateTokenRecord(after, nameId);
return new RelationshipTypeTokenCommand(before, after);
}
Aggregations