@Test public void booleanCoercionOfNumbers() throws Exception{ // Negation tests have been moved to EL subdir addVariable("bool", 0); assertFalse(evaluate("${bool}", Boolean.class)); addVariable("bool", 1); assertTrue(evaluate("${bool}", Boolean.class)); }
@Test public void jsonArrayCoercionOfStatic() throws Exception { JSONArray result = evaluate("first,second", JSONArray.class); JSONArray expected = new JSONArray("['first', 'second']"); assertEquals(expected.toString(), result.toString()); }
@Before @Override public void setUp() { super.setUp(); expressions = new Expressions(null, null, new JasperTypeConverter(), new JasperProvider()); }
@Test public void jsonArrayCoercionOfStatic() throws Exception { JSONArray result = evaluate("first,second", JSONArray.class); JSONArray expected = new JSONArray("['first', 'second']"); assertEquals(expected.toString(), result.toString()); }
@Before @Override public void setUp() { super.setUp(); expressions = new Expressions(null, null, new JasperTypeConverter(), new JasperProvider()); }
@Test public void booleanCoercionOfNumbers() throws Exception{ // Negation tests have been moved to EL subdir addVariable("bool", 0); assertFalse(evaluate("${bool}", Boolean.class)); addVariable("bool", 1); assertTrue(evaluate("${bool}", Boolean.class)); }
@Test public void jsonArrayCoercionOfStatic() throws Exception { JSONArray result = evaluate("first,second", JSONArray.class); JSONArray expected = new JSONArray("['first', 'second']"); assertEquals(expected.toString(), result.toString()); }
@Before @Override public void setUp() { super.setUp(); expressions = new Expressions(null, null, new JasperTypeConverter(), new JasperProvider()); }
@Test public void booleanCoercionOfNumbers() throws Exception{ // Negation tests have been moved to EL subdir addVariable("bool", 0); assertFalse(evaluate("${bool}", Boolean.class)); addVariable("bool", 1); assertTrue(evaluate("${bool}", Boolean.class)); }
@Test public void jsonArrayCoercionOfStatic() throws Exception { JSONArray result = evaluate("first,second", JSONArray.class); JSONArray expected = new JSONArray("['first', 'second']"); assertEquals(expected.toString(), result.toString()); }
@Before @Override public void setUp() { super.setUp(); expressions = new Expressions(null, null, new JasperTypeConverter(), new JasperProvider()); }
@Test public void booleanCoercionOfNumbers() throws Exception{ // Negation tests have been moved to EL subdir addVariable("bool", 0); assertFalse(evaluate("${bool}", Boolean.class)); addVariable("bool", 1); assertTrue(evaluate("${bool}", Boolean.class)); }
@Test public void jsonArrayCoercionOfStatic() throws Exception { JSONArray result = evaluate("first,second", JSONArray.class); JSONArray expected = new JSONArray("['first', 'second']"); assertEquals(expected.toString(), result.toString()); }
@Before @Override public void setUp() { super.setUp(); expressions = new Expressions(null, null, new JasperTypeConverter(), new JasperProvider()); }
@Test public void booleanCoercionOfNumbers() throws Exception{ // Negation tests have been moved to EL subdir addVariable("bool", 0); assertFalse(evaluate("${bool}", Boolean.class)); addVariable("bool", 1); assertTrue(evaluate("${bool}", Boolean.class)); }
@Test(expected = PropertyNotFoundException.class) public void missingTopLevelVariable() throws Exception { // Top-level properties must throw a PropertyNotFoundException when // failing; other properties must not. Pipeline data batching // relies on this assertNull(evaluate("${map.bar.baz}", Object.class)); }
@Test public void booleanCoercionOfBooleans() throws Exception{ addVariable("bool", false); assertFalse(evaluate("${bool}", Boolean.class)); assertTrue(evaluate("${!bool}", Boolean.class)); addVariable("bool", true); assertTrue(evaluate("${bool}", Boolean.class)); assertFalse(evaluate("${!bool}", Boolean.class)); }
@Test(expected = PropertyNotFoundException.class) public void missingTopLevelVariable() throws Exception { // Top-level properties must throw a PropertyNotFoundException when // failing; other properties must not. Pipeline data batching // relies on this assertNull(evaluate("${map.bar.baz}", Object.class)); }
@Test public void booleanCoercionOfBooleans() throws Exception{ addVariable("bool", false); assertFalse(evaluate("${bool}", Boolean.class)); assertTrue(evaluate("${!bool}", Boolean.class)); addVariable("bool", true); assertTrue(evaluate("${bool}", Boolean.class)); assertFalse(evaluate("${!bool}", Boolean.class)); }
@Test(expected = PropertyNotFoundException.class) public void missingTopLevelVariable() throws Exception { // Top-level properties must throw a PropertyNotFoundException when // failing; other properties must not. Pipeline data batching // relies on this assertNull(evaluate("${map.bar.baz}", Object.class)); }