Example #1
0
 /**
  * Test method for {@link de.lab4inf.wrb.Script#setVariable(java.lang.String,double)}. and {@link
  * de.lab4inf.wrb.WRBScript#getVariable(java.lang.String)}.
  */
 @Test
 public final void testSetGetVariable() throws Exception {
   double y, x = 2.78;
   String key = "XYZ";
   script.setVariable(key, x);
   y = script.getVariable(key);
   assertEquals(x, y, eps);
 }
Example #2
0
 /** Test method for {@link de.lab4inf.wrb.Script#getVariable(java.lang.String)}. */
 @Test(expected = IllegalArgumentException.class)
 public final void testGetUnknownVariable() throws Exception {
   String key = "dummy";
   script.getVariable(key);
 }