Search in sources :

Example 1 with OfferDetail

use of io.bisq.api.model.OfferDetail in project bisq-api by mrosseel.

the class OfferResourceIT method takeOffer_noOverlappingArbitrator_returnsXXX.

@Ignore("Bug in tradeManager.onTakeOffer which resolves instead of reject in this scenario")
@InSequence(7)
@Test
public void takeOffer_noOverlappingArbitrator_returnsXXX() throws Exception {
    final int bobPort = getBobPort();
    ApiTestHelper.registerArbitrator(getAlicePort());
    final OfferDetail offer = ApiTestHelper.getOfferById(bobPort, createdOffer.id);
    final List<String> arbitrators = ApiTestHelper.getAcceptedArbitrators(bobPort);
    arbitrators.removeAll(offer.arbitratorNodeAddresses);
    Assert.assertThat(arbitrators.size(), greaterThan(0));
    ApiTestHelper.deselectAllArbitrators(bobPort);
    ApiTestHelper.selectArbitrator(bobPort, arbitrators.get(0));
    final TakeOffer payload = new TakeOffer(bobPaymentAccount.id, "1");
    takeOffer_template(createdOffer.id, payload, 0);
    throw new UnsupportedOperationException("Not implemented yet");
}
Also used : TakeOffer(io.bisq.api.model.TakeOffer) OfferDetail(io.bisq.api.model.OfferDetail) Ignore(org.junit.Ignore) InSequence(org.jboss.arquillian.junit.InSequence) Test(org.junit.Test)

Example 2 with OfferDetail

use of io.bisq.api.model.OfferDetail in project bisq-api by mrosseel.

the class OfferResourceIT method selectSameArbitratorAsInOffer.

@InSequence(8)
@Test
public void selectSameArbitratorAsInOffer() throws Exception {
    final int bobPort = getBobPort();
    final OfferDetail offer = ApiTestHelper.getOfferById(bobPort, createdOffer.id);
    Assert.assertThat(offer.arbitratorNodeAddresses.size(), greaterThan(0));
    ApiTestHelper.selectArbitrator(bobPort, offer.arbitratorNodeAddresses.get(0));
}
Also used : OfferDetail(io.bisq.api.model.OfferDetail) InSequence(org.jboss.arquillian.junit.InSequence) Test(org.junit.Test)

Aggregations

OfferDetail (io.bisq.api.model.OfferDetail)2 InSequence (org.jboss.arquillian.junit.InSequence)2 Test (org.junit.Test)2 TakeOffer (io.bisq.api.model.TakeOffer)1 Ignore (org.junit.Ignore)1