ConvertLatLonBoxFF extends FunctionBase4 { @Override public NodeValue exec(NodeValue v1, NodeValue v2, NodeValue v3, NodeValue v4) { try { NodeValue result = ConvertLatLonBox.toNodeValue(v1, v2, v3, v4); return result; } catch (DatatypeFormatException ex) { throw new ExprEvalException(ex.getMessage(), ex); } }  @Override NodeValue exec(NodeValue v1, NodeValue v2, NodeValue v3, NodeValue v4);  }
@Test public void testExec() { NodeValue v1 = NodeValue.makeFloat(0.0f); NodeValue v2 = NodeValue.makeFloat(1.0f); NodeValue v3 = NodeValue.makeFloat(10.0f); NodeValue v4 = NodeValue.makeFloat(11.0f); ConvertLatLonBoxFF instance = new ConvertLatLonBoxFF(); NodeValue expResult = NodeValue.makeNode("<http: NodeValue result = instance.exec(v1, v2, v3, v4); assertEquals(expResult, result); }
@Test(expected = ExprEvalException.class) public void testExec_pos0_fail() { NodeValue v1 = NodeValue.makeString("e"); NodeValue v2 = NodeValue.makeFloat(1.0f); NodeValue v3 = NodeValue.makeFloat(10.0f); NodeValue v4 = NodeValue.makeFloat(11.0f); ConvertLatLonBoxFF instance = new ConvertLatLonBoxFF(); NodeValue expResult = NodeValue.makeNode("<http: NodeValue result = instance.exec(v1, v2, v3, v4); }
@Test(expected = ExprEvalException.class) public void testExec_pos1_fail() { NodeValue v1 = NodeValue.makeFloat(0.0f); NodeValue v2 = NodeValue.makeString("e"); NodeValue v3 = NodeValue.makeFloat(10.0f); NodeValue v4 = NodeValue.makeFloat(11.0f); ConvertLatLonBoxFF instance = new ConvertLatLonBoxFF(); NodeValue expResult = NodeValue.makeNode("<http: NodeValue result = instance.exec(v1, v2, v3, v4); }
@Test(expected = ExprEvalException.class) public void testExec_pos2_fail() { NodeValue v1 = NodeValue.makeFloat(0.0f); NodeValue v2 = NodeValue.makeFloat(1.0f); NodeValue v3 = NodeValue.makeString("e"); NodeValue v4 = NodeValue.makeFloat(11.0f); ConvertLatLonBoxFF instance = new ConvertLatLonBoxFF(); NodeValue expResult = NodeValue.makeNode("<http: NodeValue result = instance.exec(v1, v2, v3, v4); }
@Test(expected = ExprEvalException.class) public void testExec_pos3_fail() { NodeValue v1 = NodeValue.makeFloat(0.0f); NodeValue v2 = NodeValue.makeFloat(0.0f); NodeValue v3 = NodeValue.makeFloat(10.0f); NodeValue v4 = NodeValue.makeString("e"); ConvertLatLonBoxFF instance = new ConvertLatLonBoxFF(); NodeValue expResult = NodeValue.makeNode("<http: NodeValue result = instance.exec(v1, v2, v3, v4); }