Package javax.json

Examples of javax.json.JsonNumber.longValue()


        final JsonArray result = this.cut.allAsJson();
        assertNotNull(result);
        assertThat(result.size(), is(1));
        JsonObject actual = result.getJsonObject(0);
        JsonNumber actualId = actual.getJsonNumber(Registrations.CONFIRMATION_ID);
        assertThat(expected.getId(), is(actualId.longValue()));

    }

    void merge(Registration registration) {
        when(this.cut.em.merge(registration)).thenReturn(registration);
View Full Code Here


        final JsonArray result = this.cut.allAsJson();
        assertNotNull(result);
        assertThat(result.size(), is(1));
        JsonObject actual = result.getJsonObject(0);
        JsonNumber actualId = actual.getJsonNumber(Registrations.CONFIRMATION_ID);
        assertThat(expected.getId(), is(actualId.longValue()));

    }

    void merge(Registration registration) {
        when(this.cut.em.merge(registration)).thenReturn(registration);
View Full Code Here

        final JsonArray result = this.cut.allAsJson();
        assertNotNull(result);
        assertThat(result.size(), is(1));
        JsonObject actual = result.getJsonObject(0);
        JsonNumber actualId = actual.getJsonNumber(Registrations.CONFIRMATION_ID);
        assertThat(expected.getId(), is(actualId.longValue()));

    }

    void merge(Registration registration) {
        when(this.cut.em.merge(registration)).thenReturn(registration);
View Full Code Here

      timeSource = new SystemTimeTimeSource();
    }
    Simulation simulation = new Simulation(timeSource);

    JsonNumber resolution = simulationObject.getJsonNumber("resolution");
    simulation.setResolution(resolution != null ? resolution.longValue()
        : 1000L);

    JsonNumber temperature = simulationObject.getJsonNumber("temperature");
    if (temperature != null) {
      simulation.getContext().setTemperature(temperature.doubleValue());
View Full Code Here

    Map<Integer, ISensor> sensorMap = new HashMap<Integer, ISensor>();
    Map<Integer, IActuator> actuatorMap = new HashMap<Integer, IActuator>();
    Room room = new Room();
    JsonNumber roomId = roomDescription.getJsonNumber("id");
    if (roomId != null) {
      room.setId(roomId.longValue());
    }
    String roomName = roomDescription.getString("name");
    if (roomName != null) {
      room.setName(roomName);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.