1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.filter.test.integration

File TestDataParserTest.java

 

Code metrics

0
5
1
1
38
16
1
0.2
5
1
1

Classes

Class Line # Actions
TestDataParserTest 26 5 0% 1 0
1.0100%
 

Contributing tests

This file is covered by 1 test. .

Source view

1    package org.xwiki.filter.test.integration;
2    import org.junit.Assert;
3    import org.junit.Test;
4    import org.xwiki.filter.test.integration.TestDataParser;
5   
6    /*
7    * See the NOTICE file distributed with this work for additional
8    * information regarding copyright ownership.
9    *
10    * This is free software; you can redistribute it and/or modify it
11    * under the terms of the GNU Lesser General Public License as
12    * published by the Free Software Foundation; either version 2.1 of
13    * the License, or (at your option) any later version.
14    *
15    * This software is distributed in the hope that it will be useful,
16    * but WITHOUT ANY WARRANTY; without even the implied warranty of
17    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18    * Lesser General Public License for more details.
19    *
20    * You should have received a copy of the GNU Lesser General Public
21    * License along with this software; if not, write to the Free
22    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
24    */
25   
 
26    public class TestDataParserTest
27    {
 
28  1 toggle @Test
29    public void testInterpret()
30    {
31  1 System.setProperty("key", "value");
32   
33  1 Assert.assertEquals("test", TestDataParser.interpret("test"));
34  1 Assert.assertEquals("value", TestDataParser.interpret("${{{key}}}"));
35  1 Assert.assertEquals("testvaluetest", TestDataParser.interpret("test${{{key}}}test"));
36  1 Assert.assertEquals("test${{{key}}}", TestDataParser.interpret("test\\${{{key}}}"));
37    }
38    }