Search in sources :

Example 6 with UpdateSection

use of org.folio.rest.persist.Criteria.UpdateSection in project raml-module-builder by folio-org.

the class PostgresClientIT method updateSectionX.

@Test
public void updateSectionX(TestContext context) {
    UpdateSection updateSection = new UpdateSection();
    updateSection.addField("key").setValue("x");
    createFoo(context).update(FOO, updateSection, (Criterion) null, false, context.asyncAssertSuccess());
}
Also used : UpdateSection(org.folio.rest.persist.Criteria.UpdateSection) Test(org.junit.Test)

Example 7 with UpdateSection

use of org.folio.rest.persist.Criteria.UpdateSection in project raml-module-builder by folio-org.

the class UpdateSectionTest method getValueForNull.

@Test
public void getValueForNull() {
    UpdateSection updateSection = new UpdateSection();
    updateSection.setValue(null);
    assertNull(updateSection.getValue());
}
Also used : UpdateSection(org.folio.rest.persist.Criteria.UpdateSection) Test(org.junit.Test)

Example 8 with UpdateSection

use of org.folio.rest.persist.Criteria.UpdateSection in project raml-module-builder by folio-org.

the class UpdateSectionTest method getValueForString.

@Test
@Parameters
public void getValueForString(String in, String json) {
    UpdateSection updateSection = new UpdateSection();
    updateSection.setValue(in);
    assertEquals(json, updateSection.getValue());
}
Also used : UpdateSection(org.folio.rest.persist.Criteria.UpdateSection) Parameters(junitparams.Parameters) Test(org.junit.Test)

Example 9 with UpdateSection

use of org.folio.rest.persist.Criteria.UpdateSection in project raml-module-builder by folio-org.

the class UpdateSectionTest method getValueForDouble.

@Test
public void getValueForDouble() {
    UpdateSection updateSection = new UpdateSection();
    updateSection.setValue(1.234);
    assertEquals("1.234", updateSection.getValue());
}
Also used : UpdateSection(org.folio.rest.persist.Criteria.UpdateSection) Test(org.junit.Test)

Aggregations

UpdateSection (org.folio.rest.persist.Criteria.UpdateSection)9 Test (org.junit.Test)9 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 AsyncResult (io.vertx.core.AsyncResult)2 CompositeFuture (io.vertx.core.CompositeFuture)2 Future (io.vertx.core.Future)2 Handler (io.vertx.core.Handler)2 Promise (io.vertx.core.Promise)2 Vertx (io.vertx.core.Vertx)2 JsonArray (io.vertx.core.json.JsonArray)2 JsonObject (io.vertx.core.json.JsonObject)2 Async (io.vertx.ext.unit.Async)2 TestContext (io.vertx.ext.unit.TestContext)2 Timeout (io.vertx.ext.unit.junit.Timeout)2 VertxUnitRunner (io.vertx.ext.unit.junit.VertxUnitRunner)2 PgConnection (io.vertx.pgclient.PgConnection)2 PgNotification (io.vertx.pgclient.PgNotification)2 PgPool (io.vertx.pgclient.PgPool)2 RowImpl (io.vertx.pgclient.impl.RowImpl)2