1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.crypto.internal.encoder

File HexBinaryStringEncoderTest.java

 

Code metrics

0
3
2
1
54
30
2
0.67
1.5
2
1

Classes

Class Line # Actions
HexBinaryStringEncoderTest 27 3 0% 2 0
1.0100%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.crypto.internal.encoder;
21   
22    import org.junit.Before;
23    import org.junit.Rule;
24    import org.xwiki.crypto.BinaryStringEncoder;
25    import org.xwiki.test.mockito.MockitoComponentMockingRule;
26   
 
27    public class HexBinaryStringEncoderTest extends AbstractBinaryStringEncoderTest
28    {
 
29  8 toggle {
30  8 ENCODED_BYTES =
31    "4b727970746f677261706869652028766f6e20677269656368697363683a20ce"
32    + "bacf81cf85cf80cf84cf8ccf822c20e2809e766572626f7267656ee2809c2075"
33    + "6e6420ceb3cf81ceaccf86ceb5ceb9cebd2c20e2809e73636872656962656ee2"
34    + "809c2920697374206469652057697373656e7363686166742064657220566572"
35    + "7363686cc3bc7373656c756e6720766f6e20496e666f726d6174696f6e656e2e";
36   
37  8 WRAPPED_ENCODED_BYTES =
38    "4b727970746f677261706869652028766f6e20677269656368697363683a20ce" + '\n'
39    + "bacf81cf85cf80cf84cf8ccf822c20e2809e766572626f7267656ee2809c2075" + '\n'
40    + "6e6420ceb3cf81ceaccf86ceb5ceb9cebd2c20e2809e73636872656962656ee2" + '\n'
41    + "809c2920697374206469652057697373656e7363686166742064657220566572" + '\n'
42    + "7363686cc3bc7373656c756e6720766f6e20496e666f726d6174696f6e656e2e" + '\n';
43    }
44   
45    @Rule
46    public final MockitoComponentMockingRule<BinaryStringEncoder> mocker =
47    new MockitoComponentMockingRule<BinaryStringEncoder>(HexBinaryStringEncoder.class);
48   
 
49  8 toggle @Before
50    public void configure() throws Exception
51    {
52  8 encoder = mocker.getComponentUnderTest();
53    }
54    }