use of org.jboss.arquillian.junit.InSequence in project bisq-api by mrosseel.
the class ArbitratorResourceIT method selectArbitrator.
@InSequence(4)
@Test
public void selectArbitrator() {
final int alicePort = getAlicePort();
final String arbitratorAddress = getArbitratorAddress(alicePort);
assertNumberOfAcceptedArbitrators(alicePort, 0);
given().port(alicePort).pathParam("address", arbitratorAddress).when().post("/api/v1/arbitrators/{address}/select").then().statusCode(200).and().body("arbitrators.size()", equalTo(1)).and().body("total", equalTo(1));
assertNumberOfAcceptedArbitrators(alicePort, 1);
}
use of org.jboss.arquillian.junit.InSequence in project bisq-api by mrosseel.
the class ArbitratorResourceIT method deselectArbitrator.
/**
* Deselect test goes before select test because by default arbitrators are auto selected when registered
*/
@InSequence(3)
@Test
public void deselectArbitrator() {
final int alicePort = getAlicePort();
final String arbitratorAddress = getArbitratorAddress(alicePort);
assertNumberOfAcceptedArbitrators(alicePort, 1);
given().port(alicePort).pathParam("address", arbitratorAddress).when().post("/api/v1/arbitrators/{address}/deselect").then().statusCode(200).and().body("arbitrators.size()", equalTo(0)).and().body("total", equalTo(0));
assertNumberOfAcceptedArbitrators(alicePort, 0);
}
use of org.jboss.arquillian.junit.InSequence in project bisq-api by mrosseel.
the class OfferResourceIT method createOffer_notUseMarketBasePriceButNoFixedPrice_returns422status.
@InSequence(3)
@Test
public void createOffer_notUseMarketBasePriceButNoFixedPrice_returns422status() {
final OfferToCreate offer = getOfferToCreateFixedBuy(tradeCurrency, alicePaymentAccount.id);
offer.priceType = PriceType.FIXED;
final JSONObject jsonOffer = toJsonObject(offer);
jsonOffer.remove("fixedPrice");
given().port(getAlicePort()).body(jsonOffer.toString()).contentType(ContentType.JSON).when().post("/api/v1/offers").then().statusCode(422);
}
use of org.jboss.arquillian.junit.InSequence in project bisq-api by mrosseel.
the class OfferResourceIT method takeOffer_amountMissing_returns422.
@InSequence(7)
@Test
public void takeOffer_amountMissing_returns422() throws Exception {
final TakeOffer payload = new TakeOffer(bobPaymentAccount.id, null);
takeOffer_template(createdOffer.id, payload, 422);
}
use of org.jboss.arquillian.junit.InSequence in project bisq-api by mrosseel.
the class OfferResourceIT method createOffer_validPayloadButNoFunds_returns427status.
@InSequence(3)
@Test
public void createOffer_validPayloadButNoFunds_returns427status() {
final OfferToCreate offer = getOfferToCreateFixedBuy(tradeCurrency, alicePaymentAccount.id);
createOffer_template(offer, 427);
}
Aggregations