message: Adding testing methodology for validation checks
diff: @@ -9,6 +9,9 @@ import {
  UnsignedAccountPermissionUpdateContractTx,
  AccountPermissionUpdateContractPriv,
  InvalidIDTransaction,
  + UnsignedBuildInvalidIDTransaction,
  + UnsignedInvalidExpirationBuildTransaction,
  + UnsignedInvalidContractBuildTransaction, UnsignedBuildEmptyIDTransaction, UnsignedInvalidTimeStampBuildTransaction,
  } from '../../../resources/trx';
  import { getBuilder } from "../../../../src";
  import * as Crypto from "../../../../src/utils/crypto";
  @@ -170,6 +173,38 @@ describe('Tron', function() {
  txBuilder.from(txJson);
  txBuilder.sign({ key: FirstPrivateKey });
  // Build calls validateTransaction()
  + it('should throw exception of wrong id', () => {
  + const txJson = JSON.stringify(UnsignedBuildInvalidIDTransaction);
  + txBuilder.from(txJson);
  + txBuilder.sign({ key: FirstPrivateKey });
  + should.throws(() => txBuilder.build());
  + });
  +
  + it('should throw exception of empty id', () => {
  + const txJson = JSON.stringify(UnsignedBuildEmptyIDTransaction);
  + txBuilder.from(txJson);
  + txBuilder.sign({ key: FirstPrivateKey });
  + should.throws(() => txBuilder.build());
  + });
  +
  + it('should throw exception of invalid time stamp', () => {
  + const txJson = JSON.stringify(UnsignedInvalidTimeStampBuildTransaction);
  + txBuilder.from(txJson);
  + txBuilder.sign({ key: FirstPrivateKey });
  + should.throws(() => txBuilder.build());
  + });
  +
  + it('should throw exception of invalid expiration time', () => {
  + const txJson = JSON.stringify(UnsignedInvalidExpirationBuildTransaction);
  + txBuilder.from(txJson);
  + txBuilder.sign({ key: FirstPrivateKey });
  + should.throws(() => txBuilder.build());
  + });
  +
  + it('should throw exception of non-existence of contract', () => {
  + const txJson = JSON.stringify(UnsignedInvalidContractBuildTransaction);
  + txBuilder.from(txJson);
  + txBuilder.sign({ key: FirstPrivateKey });
  should.throws(() => txBuilder.build());
  });
  });
  