1. Project Clover database mar. avr. 16 2024 08:19:06 CEST
  2. Package org.devacfr.maven.skins.reflow.snippet

File TemplateMacroTest.java

 

Code metrics

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

Classes

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

Contributing tests

This file is covered by 2 tests. .

Source view

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