use of co.rsk.core.RskAddress in project rskj by rsksmart.
the class RemascStorageProviderTest method setAndGetBurnedBalance.
@Test
public void setAndGetBurnedBalance() {
RskAddress accountAddress = randomAddress();
Repository repository = new RepositoryImpl(config);
RemascStorageProvider provider = new RemascStorageProvider(repository, accountAddress);
provider.setBurnedBalance(Coin.valueOf(1));
Assert.assertEquals(Coin.valueOf(1), provider.getBurnedBalance());
}
use of co.rsk.core.RskAddress in project rskj by rsksmart.
the class RemascStorageProviderTest method randomAddress.
private RskAddress randomAddress() {
byte[] bytes = new byte[20];
new Random().nextBytes(bytes);
return new RskAddress(bytes);
}
use of co.rsk.core.RskAddress in project rskj by rsksmart.
the class RemascStorageProviderTest method setSaveRetrieveAndGetBurnedBalance.
@Test
public void setSaveRetrieveAndGetBurnedBalance() throws IOException {
RskAddress accountAddress = randomAddress();
Repository repository = new RepositoryImplForTesting();
RemascStorageProvider provider = new RemascStorageProvider(repository, accountAddress);
provider.setBurnedBalance(Coin.valueOf(255));
provider.save();
RemascStorageProvider newProvider = new RemascStorageProvider(repository, accountAddress);
Assert.assertEquals(Coin.valueOf(255), newProvider.getBurnedBalance());
}
use of co.rsk.core.RskAddress in project rskj by rsksmart.
the class RemascStorageProviderTest method getDefaultBrokenSelectionRule.
@Test
public void getDefaultBrokenSelectionRule() {
RskAddress accountAddress = randomAddress();
Repository repository = new RepositoryImpl(config);
RemascStorageProvider provider = new RemascStorageProvider(repository, accountAddress);
Assert.assertEquals(Boolean.FALSE, provider.getBrokenSelectionRule());
}
use of co.rsk.core.RskAddress in project rskj by rsksmart.
the class RemascStorageProviderTest method setSaveRetrieveAndGetBrokenSelectionRule.
@Test
public void setSaveRetrieveAndGetBrokenSelectionRule() throws IOException {
RskAddress accountAddress = randomAddress();
Repository repository = new RepositoryImplForTesting();
RemascStorageProvider provider = new RemascStorageProvider(repository, accountAddress);
provider.setBrokenSelectionRule(Boolean.TRUE);
provider.save();
RemascStorageProvider newProvider = new RemascStorageProvider(repository, accountAddress);
Assert.assertEquals(Boolean.TRUE, newProvider.getBrokenSelectionRule());
}
Aggregations