@Test public void notifyFields() { VnocNode dbNode; VnocNode node = anExistingNode(); node.setName("Test-Notify-" + randomUUID().toString().substring(0, 10)); node.setIp("23." + randIntStr(255) + "." + randIntStr(255) + "." + randIntStr(255)); assertFalse(res.nodeExists(node)); assertEquals("-1", node.getId()); res.createVnocNode(node); log.debug("LOCAL:" + node); String contact = "xXx"; String notes = "Are you afraid of the dark?"; node.setNotifyContact(contact); node.setNotifyNotes(notes); node.setNotifyByEmail("true"); node.setNotifyByPhone("true"); node.setNotifyBundleId("MB00000000"); res.updateVnocNode(node); dbNode = res.getVnocNodeById(node.getId()); log.debug("DB:" + dbNode); assertEquals(contact, dbNode.getNotifyContact()); assertEquals(notes, dbNode.getNotifyNotes()); assertEquals("true", dbNode.getNotifyByEmail()); assertEquals("true", dbNode.getNotifyByPhone()); log.debug("DELETING:" + node.getId()); res.deleteVnocNodeById(node.getId()); }
private final VnocNode anExistingNode() { return res.getSingleVnocNode(); }