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