Skip to content

Commit

Permalink
Add more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rg911 committed Feb 12, 2021
1 parent a1119d6 commit d5e609d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/model/transaction/NamespaceRegistrationTransaction.spec.ts
Expand Up @@ -153,4 +153,27 @@ describe('NamespaceRegistrationTransaction', () => {
Object.assign(tx, { signer: account.publicAccount });
expect(tx.shouldNotifyAccount(account.address)).to.be.true;
});

it('Sub namespacename craetd by different type of parent id', () => {
const parentNamespace = 'parent';
const childNamespace = 'child';
const parentId = new NamespaceId(parentNamespace);

const subNameSpaceTransactionStringParent = NamespaceRegistrationTransaction.createSubNamespace(
Deadline.create(1573430400),
childNamespace,
parentNamespace,
NetworkType.TEST_NET,
UInt64.fromUint(100000),
);
const subNameSpaceTransactionIdParent = NamespaceRegistrationTransaction.createSubNamespace(
Deadline.create(1573430400),
childNamespace,
parentId,
NetworkType.TEST_NET,
UInt64.fromUint(100000),
);

expect(subNameSpaceTransactionStringParent.namespaceId.equals(subNameSpaceTransactionIdParent.namespaceId)).to.be.true;
});
});

0 comments on commit d5e609d

Please sign in to comment.