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