@@ -302,26 +302,26 @@ public void shouldRejectWrongIncorrectOperator() {
302
302
@ Test
303
303
public void shouldCompareNumbersWithLT () {
304
304
305
- String source = "<html><#if two lt three > tada </#if></html>" ;
305
+ String source = "<html><#if left lt right > tada </#if></html>" ;
306
306
Template template = new Template (source );
307
307
StringWriter w = new StringWriter ();
308
- template .process (map ("two " , 2 , "three " , 3 ), w );
308
+ template .process (map ("left " , 2 , "right " , 3 ), w );
309
309
a (w .toString ()).shouldBeEqual ("<html> tada </html>" );
310
310
311
- source = "<html><#if three lt two > tada </#if></html>" ;
311
+ source = "<html><#if left lt right > tada </#if></html>" ;
312
312
template = new Template (source );
313
313
w = new StringWriter ();
314
- template .process (map ("three " , 3 , "two " , 2 ), w );
314
+ template .process (map ("left " , 3 , "right " , 2 ), w );
315
315
a (w .toString ()).shouldBeEqual ("<html></html>" );
316
316
}
317
317
318
318
@ Test
319
319
public void shouldCompareNumbersWithLTE () {
320
320
321
- String source = "<html><#if three lt= three > tada </#if></html>" ;
321
+ String source = "<html><#if left lt= right > tada </#if></html>" ;
322
322
Template template = new Template (source );
323
323
StringWriter w = new StringWriter ();
324
- template .process (map ("three " , 3 , "three " , 3 ), w );
324
+ template .process (map ("left " , 3 , "right " , 3 ), w );
325
325
a (w .toString ()).shouldBeEqual ("<html> tada </html>" );
326
326
}
327
327
@@ -343,74 +343,74 @@ public void shouldCompareNumbersWithGTE() {
343
343
@ Test
344
344
public void shouldCompareNumbersWithGT () {
345
345
346
- String source = "<html><#if three gt two > tada </#if></html>" ;
346
+ String source = "<html><#if left gt right > tada </#if></html>" ;
347
347
Template template = new Template (source );
348
348
StringWriter w = new StringWriter ();
349
- template .process (map ("three " , 3 , "two " , 2 ), w );
349
+ template .process (map ("left " , 3 , "right " , 2 ), w );
350
350
a (w .toString ()).shouldBeEqual ("<html> tada </html>" );
351
351
352
- source = "<html><#if two gt three > tada </#if></html>" ;
352
+ source = "<html><#if left gt right > tada </#if></html>" ;
353
353
template = new Template (source );
354
354
w = new StringWriter ();
355
- template .process (map ("two " , 2 , "three " , 3 ), w );
355
+ template .process (map ("left " , 2 , "right " , 3 ), w );
356
356
a (w .toString ()).shouldBeEqual ("<html></html>" );
357
357
}
358
358
359
359
360
360
@ Test
361
361
public void shouldCompareObjectsWithEQ () {
362
362
363
- String source = "<html><#if word1 == word2 > tada </#if></html>" ;
363
+ String source = "<html><#if left == right > tada </#if></html>" ;
364
364
Template template = new Template (source );
365
365
StringWriter w = new StringWriter ();
366
- template .process (map ("word1 " , "help" , "word2 " , "help" ), w );
366
+ template .process (map ("left " , "help" , "right " , "help" ), w );
367
367
a (w .toString ()).shouldBeEqual ("<html> tada </html>" );
368
368
369
369
w = new StringWriter ();
370
- template .process (map ("word1 " , "help!" , "word2 " , "help?" ), w );
370
+ template .process (map ("left " , "help!" , "right " , "help?" ), w );
371
371
a (w .toString ()).shouldBeEqual ("<html></html>" );
372
372
}
373
373
374
374
@ Test
375
375
public void shouldCompareObjectsWithNEQ () {
376
376
377
- String source = "<html><#if word1 != word2 > tada </#if></html>" ;
377
+ String source = "<html><#if left != right > tada </#if></html>" ;
378
378
Template template = new Template (source );
379
379
StringWriter w = new StringWriter ();
380
- template .process (map ("word1 " , "help!" , "word2 " , "help?" ), w );
380
+ template .process (map ("left " , "help!" , "right " , "help?" ), w );
381
381
a (w .toString ()).shouldBeEqual ("<html> tada </html>" );
382
382
383
383
w = new StringWriter ();
384
- template .process (map ("word1 " , "help" , "word2 " , "help" ), w );
384
+ template .process (map ("left " , "help" , "right " , "help" ), w );
385
385
a (w .toString ()).shouldBeEqual ("<html></html>" );
386
386
}
387
387
388
388
389
389
@ Test
390
390
public void shouldCompareBooleansWithOR () {
391
391
392
- String source = "<html><#if cond1 || cond2 > tada </#if></html>" ;
392
+ String source = "<html><#if left || left > tada </#if></html>" ;
393
393
Template template = new Template (source );
394
394
StringWriter w = new StringWriter ();
395
- template .process (map ("cond1 " , true , "cond2 " , true ), w );
395
+ template .process (map ("left " , true , "left " , true ), w );
396
396
a (w .toString ()).shouldBeEqual ("<html> tada </html>" );
397
397
398
398
w = new StringWriter ();
399
- template .process (map ("cond1 " , true , "cond2 " , false ), w );
399
+ template .process (map ("left " , true , "right " , false ), w );
400
400
a (w .toString ()).shouldBeEqual ("<html> tada </html>" );
401
401
}
402
402
403
403
@ Test
404
404
public void shouldCompareBooleansWithAND () {
405
405
406
- String source = "<html><#if cond1 && cond2 > tada </#if></html>" ;
406
+ String source = "<html><#if left && right > tada </#if></html>" ;
407
407
Template template = new Template (source );
408
408
StringWriter w = new StringWriter ();
409
- template .process (map ("cond1 " , true , "cond2 " , true ), w );
409
+ template .process (map ("left " , true , "right " , true ), w );
410
410
a (w .toString ()).shouldBeEqual ("<html> tada </html>" );
411
411
412
412
w = new StringWriter ();
413
- template .process (map ("cond1 " , true , "cond2 " , false ), w );
413
+ template .process (map ("left " , true , "right " , false ), w );
414
414
a (w .toString ()).shouldBeEqual ("<html></html>" );
415
415
}
416
416
0 commit comments