use of me.retrodaredevil.solarthing.solar.SolarStatusPacket in project solarthing by wildmountainfarms.
the class RenogyTest method testRoverExisting.
@Test
void testRoverExisting() throws IOException {
assertTrue(DIRECTORY_ROVER.isDirectory());
ObjectMapper mapper = JacksonUtil.defaultMapper();
for (File file : requireNonNull(DIRECTORY_ROVER.listFiles())) {
SolarStatusPacket packet = mapper.readValue(file, SolarStatusPacket.class);
assertTrue(packet instanceof RoverStatusPacket, "Got packet: " + packet);
}
}
use of me.retrodaredevil.solarthing.solar.SolarStatusPacket in project solarthing by wildmountainfarms.
the class TracerTest method testTracerExisting.
@Test
void testTracerExisting() throws IOException {
assertTrue(DIRECTORY_TRACER.isDirectory());
ObjectMapper mapper = JacksonUtil.defaultMapper();
for (File file : requireNonNull(DIRECTORY_TRACER.listFiles())) {
SolarStatusPacket packet = mapper.readValue(file, SolarStatusPacket.class);
assertTrue(packet instanceof TracerStatusPacket, "Got packet: " + packet);
}
}
use of me.retrodaredevil.solarthing.solar.SolarStatusPacket in project solarthing by wildmountainfarms.
the class OutbackPacketsTest method testExistingPackets.
@Test
void testExistingPackets() throws IOException {
assertTrue(DIRECTORY_FX.isDirectory());
assertTrue(DIRECTORY_MX.isDirectory());
ObjectMapper mapper = JacksonUtil.defaultMapper();
for (File file : requireNonNull(DIRECTORY_FX.listFiles())) {
SolarStatusPacket packet = mapper.readValue(file, SolarStatusPacket.class);
assertTrue(packet instanceof FXStatusPacket);
}
for (File file : requireNonNull(DIRECTORY_MX.listFiles())) {
SolarStatusPacket packet = mapper.readValue(file, SolarStatusPacket.class);
assertTrue(packet instanceof MXStatusPacket);
}
}
Aggregations