public void Test_that_single_transfer_is_allowed() { TransactionTransfersValidator.Validate(new List <Transfer> { new Transfer ( new Asset("STEEM"), UMoney.Create(100, 3), "A", "B" ) }); }
public void Test_that_duplicated_transfers_are_not_allowed() { var transfers = new List <Transfer> { new Transfer ( new Asset("XRP"), UMoney.Create(100, 3), "A", "B" ), new Transfer ( new Asset("XRP"), UMoney.Create(80, 5), "A", "B" ) }; Assert.Throws <RequestValidationException>(() => TransactionTransfersValidator.Validate(transfers)); }
public void Test_that_multiple_transfers_are_allowed( string asset1, string asset2, string asset3, string source1, string source2, string source3, string destination1, string destination2, string destination3) { TransactionTransfersValidator.Validate(new List <Transfer> { new Transfer ( new Asset(asset1), UMoney.Create(100, 3), source1, destination1 ), new Transfer ( new Asset(asset2), UMoney.Create(80, 5), source2, destination2 ), new Transfer ( new Asset(asset3), UMoney.Create(80, 5), source3, destination3 ) }); }
public void Test_that_empty_collection_is_not_allowed() { Assert.Throws <RequestValidationException>(() => TransactionTransfersValidator.Validate(Array.Empty <Transfer>())); }
public void Test_that_null_is_not_allowed() { Assert.Throws <RequestValidationException>(() => TransactionTransfersValidator.Validate(null)); }