Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it should "create and process limit order434534534" in {
- val asset = authorized { implicit auth =>
- val asset = getAssets(auth.userId).head
- createOffering(asset.id, 2, askPrice)
- asset
- }
- val asset2 = authorizedRandomUser { implicit auth =>
- val asset2 = getAssets(auth.userId).head
- val amount = 2
- createTransaction(TransactionOperation.Deposit, askPrice * amount)
- createOrder(asset.id, OrderType.Limit, OrderSide.Buy, askPrice, amount)
- waitForUpdates()
- createOrder(asset.id, OrderType.Limit, OrderSide.Sell, askPrice, amount)
- val userOrders = getOrders(auth.userId)
- userOrders.size should be (0)
- asset2
- }
- authorizedRandomUser { implicit auth =>
- val amount = 2
- createTransaction(TransactionOperation.Deposit, askPrice * amount)
- createOrder(asset2.id, OrderType.Limit, OrderSide.Buy, askPrice, amount)
- waitForUpdates()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement