public void testVariableExistsNotOk() { HashMap<String, CvValue> v = createCvMap(); CvValue cv = new CvValue("81", p); cv.setValue(3); v.put("81", cv); // create a variable pointed at CV 81, check name VariableValue variable = makeVar( "label check", "comment", "", false, false, false, false, "81", "XXVVVVVV", 0, 255, v, null, "item check"); // test Exists ArithmeticQualifier aq = new TestArithmeticQualifier(variable, 0, "exists"); Assert.assertEquals(false, aq.currentDesiredState()); }
public void testVariableRefEqNotExist() { // test arithmetic operation when variable not found ArithmeticQualifier aq = new TestArithmeticQualifier(null, 10, "eq"); Assert.assertEquals(true, aq.currentDesiredState()); // chosen default in this case jmri.util.JUnitAppender.assertErrorMessage( "Arithmetic EQ operation when watched value doesn't exist"); }
public void testVariableNotExistsNOk() { ArithmeticQualifier aq = new TestArithmeticQualifier(null, 1, "exists"); Assert.assertEquals(false, aq.currentDesiredState()); }