use of com.hedera.services.txns.file.FileCreateTransitionLogicTest.ValidProperty.CONTENTS in project hedera-services by hashgraph.
the class FileCreateTransitionLogicTest method happyPathFlows.
@Test
void happyPathFlows() {
// setup:
InOrder inOrder = inOrder(hfs, txnCtx, sigImpactHistorian);
givenTxnCtxCreating(EnumSet.allOf(ValidProperty.class));
// and:
given(hfs.create(any(), any(), any())).willReturn(created);
// when:
subject.doStateTransition();
// then:
inOrder.verify(txnCtx).activePayer();
inOrder.verify(hfs).create(argThat(bytes -> Arrays.equals(contents, bytes)), argThat(info -> info.getWacl().toString().equals(hederaWacl.toString()) && info.getExpiry() == expiry && memo.equals(info.getMemo())), argThat(genesis::equals));
inOrder.verify(txnCtx).setCreated(created);
inOrder.verify(txnCtx).setStatus(SUCCESS);
inOrder.verify(sigImpactHistorian).markEntityChanged(created.getFileNum());
}
Aggregations