@Test public void canParsePulseData() throws Exception { AndBloodPressureConfirmedMeasurementDataPacket packet = new AndBloodPressureConfirmedMeasurementDataPacket( PrettyByteParser.parse(confirmedMeasurementWithPulse)); assertFalse(packet.hasBloodPressure()); assertTrue(packet.hasPulse()); assertEquals(55, packet.getPulse()); }
@Test public void canParseBloodPressure() throws Exception { AndBloodPressureConfirmedMeasurementDataPacket packet = new AndBloodPressureConfirmedMeasurementDataPacket( PrettyByteParser.parse(confirmedMeasurementWithBloodPressure)); assertTrue(packet.hasBloodPressure()); assertFalse(packet.hasPulse()); assertEquals(114, packet.getSystolicBloodPressure()); assertEquals(67, packet.getDiastolicBloodPressure()); assertEquals(90, packet.getMeanArterialPressure()); }