use of com.hedera.services.store.models.Id in project hedera-services by hashgraph.
the class BalanceChangeTest method tokenAdjust.
@Test
void tokenAdjust() {
final var tokenAdjust = BalanceChange.tokenAdjust(IdUtils.asModelId("1.2.3"), IdUtils.asModelId("3.2.1"), 10, null, true);
assertEquals(10, tokenAdjust.getAggregatedUnits());
assertEquals(0, tokenAdjust.getAllowanceUnits());
assertEquals(new Id(1, 2, 3), tokenAdjust.getAccount());
assertEquals(new Id(3, 2, 1), tokenAdjust.getToken());
}
use of com.hedera.services.store.models.Id in project hedera-services by hashgraph.
the class EntityNumPairTest method factoryFromModelRelWorks.
@Test
void factoryFromModelRelWorks() {
final var expected = fromLongs(1, 2);
final var modelRel = new TokenRelationship(new Token(new Id(0, 0, 2)), new Account(new Id(0, 0, 1)));
final var actual = EntityNumPair.fromModelRel(modelRel);
assertEquals(expected, actual);
}
Aggregations