コード例 #1
0
  @Test
  public void test_OK() throws Exception {
    when(assetIssuingTransactionDao.getNumberOfIssuedAssets(assetPublicKey)).thenReturn(5);

    int issuedAssets = digitalAssetCryptoTransactionFactory.getNumberOfIssuedAssets(assetPublicKey);
    assertThat(issuedAssets).isEqualTo(5);
  }
コード例 #2
0
  @Before
  public void setUp() throws Exception {
    pluginId = UUID.randomUUID();
    digitalAssetCryptoTransactionFactory =
        new DigitalAssetCryptoTransactionFactory(
            this.pluginId,
            this.cryptoVaultManager,
            this.bitcoinWalletManager,
            this.pluginDatabaseSystem,
            this.pluginFileSystem,
            this.assetVaultManager,
            this.cryptoAddressBookManager,
            this.outgoingIntraActorManager);
    digitalAssetCryptoTransactionFactory.setErrorManager(errorManager);
    digitalAssetCryptoTransactionFactory.setAssetIssuingTransactionDao(assetIssuingTransactionDao);

    MemberModifier.field(AssetIssuingTransactionDao.class, "database")
        .set(assetIssuingTransactionDao, database);

    assetPublicKey = "assetPublicKey";
  }