1. Project Clover database mar. janv. 20 2026 12:32:22 CET
  2. Package org.devacfr.maven.skins.reflow.snippet

File TemplateMacroTest.java

 

Code metrics

0
10
2
1
49
29
4
0,4
5
2
2

Classes

Class Line # Actions
TemplateMacroTest 23 10 0% 4 2
0.833333383,3%
 

Contributing tests

This file is covered by 2 tests. .

Source view

1    /*
2    * Copyright 2012-2025 Christophe Friederich
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    * See the License for the specific language governing permissions and
14    * limitations under the License.
15    */
16    package org.devacfr.maven.skins.reflow.snippet;
17   
18    import com.google.common.io.CharSource;
19    import java.io.IOException;
20    import org.devacfr.testing.jupiter.PlexusTestCase;
21    import org.junit.jupiter.api.Test;
22   
 
23    public class TemplateMacroTest extends PlexusTestCase {
24   
 
25  1 toggle @Test
26    public void shouldConvert() {
27  1 final PartialTemplateMacro macro = new PartialTemplateMacro();
28   
29  1 verify(actual -> {
30  1 try {
31  1 return macro.convertSnippet(CharSource.wrap(actual));
32    } catch (final IOException e) {
33  0 throw new RuntimeException(e.getMessage(), e);
34    }
35    }, "html");
36    }
37   
 
38  1 toggle @Test
39    public void shouldConvertHtmlSnippet() {
40  1 final PartialTemplateMacro macro = new PartialTemplateMacro();
41  1 verify(actual -> {
42  1 try {
43  1 return macro.convertSnippet(CharSource.wrap(actual));
44    } catch (final IOException e) {
45  0 throw new RuntimeException(e.getMessage(), e);
46    }
47    }, "html");
48    }
49    }