ScriptRequestMessage extends RexProMessage { public void metaSetInSession(Boolean val) { Meta.put("inSession", val); }  javax.script.Bindings getBindings(); void metaSetInSession(Boolean val); Boolean metaGetInSession(); void metaSetGraphName(final String val); String metaGetGraphName(); void metaSetGraphObjName(final String val); String metaGetGraphObjName(); void metaSetIsolate(final boolean val); Boolean metaGetIsolate(); void metaSetTransaction(final boolean val); Boolean metaGetTransaction(); void metaSetConsole(final boolean v); Boolean metaGetConsole(); public String LanguageName; public String Script; public RexProBindings Bindings; }
@Test public void testMetaValidation() { final ScriptRequestMessage msg = new ScriptRequestMessage(); msg.setRequestAsUUID(UUID.randomUUID()); msg.setSessionAsUUID(UUID.randomUUID()); msg.LanguageName = "groovy"; msg.Script = "script"; try { msg.metaSetInSession(true); msg.validateMetaData(); msg.metaSetInSession(false); msg.validateMetaData(); } catch (RexProException ex) { Assert.fail(); } try { msg.Meta.put(ScriptRequestMessage.META_KEY_IN_SESSION, 5); msg.validateMetaData(); Assert.fail(); } catch (RexProException ex) { } try { msg.Meta.put(ScriptRequestMessage.META_KEY_IN_SESSION, "yup"); msg.validateMetaData(); Assert.fail(); } catch (RexProException ex) { } }