test sell order val sellerId Account getId Crypto getPublicKey phrase1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
test("sell order"){
val sellerId = Account.getId(Crypto.getPublicKey(phrase1))
val att = new Attachment.MessagingAliasSell(alias, 0)
val recip = Account.getId(Crypto.getPublicKey(phrase2))
issueTx(att, phrase1, recip)
val mbOffer = afterNextBlock[Alias.Offer]{
Option(Alias.getOffer(alias))
}
assert(mbOffer.isDefined)
assert(mbOffer.get.getBuyerId==sellerId)
assert(mbOffer.get.getPriceNQT==0)
}