use of io.nem.sdk.model.namespace.NamespaceId in project nem2-sdk-java by nemtech.
the class MosaicInfoTest method shouldReturnIsTransferableWhenLevyIsMutable.
@Test
void shouldReturnIsTransferableWhenLevyIsMutable() {
MosaicProperties mosaicProperties = new MosaicProperties(true, true, true, 3, BigInteger.valueOf(10));
MosaicInfo mosaicInfo = new MosaicInfo(true, 0, "5A3CD9B09CD1E8000159249B", new NamespaceId(new BigInteger("-8884663987180930485")), new MosaicId(new BigInteger("-3087871471161192663")), new BigInteger("100"), new BigInteger("0"), new PublicAccount("B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF", NetworkType.MIJIN_TEST), mosaicProperties);
assertTrue(mosaicInfo.isLevyMutable());
}
use of io.nem.sdk.model.namespace.NamespaceId in project nem2-sdk-java by nemtech.
the class MosaicInfoTest method shouldReturnIsSupplyMutableWhenIsMutable.
@Test
void shouldReturnIsSupplyMutableWhenIsMutable() {
MosaicProperties mosaicProperties = new MosaicProperties(true, true, true, 3, BigInteger.valueOf(10));
MosaicInfo mosaicInfo = new MosaicInfo(true, 0, "5A3CD9B09CD1E8000159249B", new NamespaceId(new BigInteger("-8884663987180930485")), new MosaicId(new BigInteger("-3087871471161192663")), new BigInteger("100"), new BigInteger("0"), new PublicAccount("B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF", NetworkType.MIJIN_TEST), mosaicProperties);
assertTrue(mosaicInfo.isSupplyMutable());
}
use of io.nem.sdk.model.namespace.NamespaceId in project nem2-sdk-java by nemtech.
the class MosaicInfoTest method shouldReturnIsTransferableWhenItsTransferable.
@Test
void shouldReturnIsTransferableWhenItsTransferable() {
MosaicProperties mosaicProperties = new MosaicProperties(true, true, true, 3, BigInteger.valueOf(10));
MosaicInfo mosaicInfo = new MosaicInfo(true, 0, "5A3CD9B09CD1E8000159249B", new NamespaceId(new BigInteger("-8884663987180930485")), new MosaicId(new BigInteger("-3087871471161192663")), new BigInteger("100"), new BigInteger("0"), new PublicAccount("B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF", NetworkType.MIJIN_TEST), mosaicProperties);
assertTrue(mosaicInfo.isTransferable());
}
use of io.nem.sdk.model.namespace.NamespaceId in project nem2-sdk-java by nemtech.
the class MosaicInfoTest method createAMosaicInfoViaConstructor.
@Test
void createAMosaicInfoViaConstructor() {
MosaicProperties mosaicProperties = new MosaicProperties(true, true, true, 3, BigInteger.valueOf(10));
NamespaceId namespaceId = new NamespaceId(new BigInteger("-8884663987180930485"));
MosaicId mosaicId = new MosaicId(new BigInteger("-3087871471161192663"));
MosaicInfo mosaicInfo = new MosaicInfo(true, 0, "5A3CD9B09CD1E8000159249B", namespaceId, mosaicId, new BigInteger("100"), new BigInteger("0"), new PublicAccount("B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF", NetworkType.MIJIN_TEST), mosaicProperties);
assertEquals(true, mosaicInfo.isActive());
assertTrue(mosaicInfo.getIndex() == 0);
assertEquals("5A3CD9B09CD1E8000159249B", mosaicInfo.getMetaId());
assertEquals(namespaceId, mosaicInfo.getNamespaceId());
assertEquals(mosaicId, mosaicInfo.getMosaicId());
assertEquals(new BigInteger("100"), mosaicInfo.getSupply());
assertEquals(new BigInteger("0"), mosaicInfo.getHeight());
assertEquals(new PublicAccount("B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF", NetworkType.MIJIN_TEST), mosaicInfo.getOwner());
assertTrue(mosaicInfo.isSupplyMutable());
assertTrue(mosaicInfo.isTransferable());
assertTrue(mosaicInfo.isLevyMutable());
assertEquals(3, mosaicInfo.getDivisibility());
assertEquals(BigInteger.valueOf(10), mosaicInfo.getDuration());
}
use of io.nem.sdk.model.namespace.NamespaceId in project nem2-sdk-java by nemtech.
the class MosaicNameTest method createAMosaicName.
@Test
void createAMosaicName() {
NamespaceId namespaceId = new NamespaceId(new BigInteger("-8884663987180930485"));
MosaicId mosaicId = new MosaicId(new BigInteger("-3087871471161192663"));
MosaicName mosaicName = new MosaicName(mosaicId, "xem", namespaceId);
assertEquals(mosaicId, mosaicName.getMosaicId());
assertEquals("xem", mosaicName.getName());
assertEquals(namespaceId, mosaicName.getParentId());
}
Aggregations