|
10 | 10 | select="40" />
|
11 | 11 |
|
12 | 12 | <xsl:template match="/">
|
| 13 | + <style> |
| 14 | + |
| 15 | +.mhc |
| 16 | +{ #method high coverage |
| 17 | + text-align: left; |
| 18 | + background-color:#86ed60; |
| 19 | +} |
| 20 | + |
| 21 | +.mmc |
| 22 | +{ #method medium coverage |
| 23 | + text-align: left; |
| 24 | + background-color:#ffff99; |
| 25 | +} |
| 26 | + |
| 27 | +.mbc |
| 28 | +{ #method bad coverage |
| 29 | + text-align: left; |
| 30 | + background-color:#eb4848; |
| 31 | +} |
| 32 | + |
| 33 | + |
| 34 | +.chc |
| 35 | +{ #class high coverage |
| 36 | + text-align: left; |
| 37 | + border-right: 1px solid #649cc0; |
| 38 | + border-bottom: 1px solid #649cc0; |
| 39 | + width: 100; |
| 40 | + font-weight: bold; |
| 41 | + background-color:#86ed60; |
| 42 | + margin-right:16px; |
| 43 | +} |
| 44 | + |
| 45 | +.cmc |
| 46 | +{ #class high coverage |
| 47 | + text-align: left; |
| 48 | + border-right: 1px solid #649cc0; |
| 49 | + border-bottom: 1px solid #649cc0; |
| 50 | + width: 100; |
| 51 | + font-weight: bold; |
| 52 | + background-color:#ffff99; |
| 53 | + margin-right:16px; |
| 54 | +} |
| 55 | + |
| 56 | +.cbc |
| 57 | +{ #class high coverage |
| 58 | + text-align: left; |
| 59 | + border-right: 1px solid #649cc0; |
| 60 | + border-bottom: 1px solid #649cc0; |
| 61 | + width: 100; |
| 62 | + font-weight: bold; |
| 63 | + background-color:#eb4848; |
| 64 | + margin-right:16px; |
| 65 | +} |
| 66 | + </style> |
| 67 | + |
13 | 68 |
|
14 | 69 | <xsl:variable name="root"
|
15 | 70 | select="//CoverageDSPriv" />
|
16 | 71 |
|
17 | 72 | <xsl:if test="$root">
|
| 73 | + <h3>Code Coverage Summary (MsTest)</h3> |
| 74 | + |
18 | 75 | <table class="section-table"
|
19 | 76 | cellpadding="2"
|
20 | 77 | cellspacing="0"
|
21 |
| - border="0" |
22 |
| - width="98%"> |
23 |
| - <tr> |
24 |
| - <td class="sectionheader">Code Coverage Summary (MsTest)</td> |
25 |
| - </tr> |
| 78 | + border="1"> |
| 79 | + <tr><td class="mhc">highCoverage >= <xsl:value-of select="$highCoverage" /> %</td></tr> |
| 80 | + <tr><td class="mmc">mediumCoverage >= <xsl:value-of select="$mediumCoverage" /> %</td></tr> |
| 81 | + <tr><td class="mbc">bad < <xsl:value-of select="$mediumCoverage" /> % </td></tr> |
26 | 82 | </table>
|
27 | 83 |
|
28 | 84 | <br/>
|
|
91 | 147 | <li>
|
92 | 148 | <xsl:variable name="pctCovered"
|
93 | 149 | select="(BlocksCovered div (BlocksCovered + BlocksNotCovered)) * 100" />
|
94 |
| - <table> |
95 |
| - <tr> |
96 |
| - <td> |
97 |
| - <xsl:attribute name="style"> |
98 |
| - text-align: left; border-right: 1px solid #649cc0; border-bottom: 1px solid #649cc0; width: 100; font-weight: bold; |
99 |
| - <xsl:choose> |
100 |
| - <xsl:when test="number($pctCovered >= $highCoverage)">background-color:#86ed60;</xsl:when> |
101 |
| - <xsl:when test="number($pctCovered >= $mediumCoverage)">background-color:#ffff99;</xsl:when> |
102 |
| - <xsl:otherwise>background-color:#eb4848;</xsl:otherwise> |
| 150 | + <span><xsl:attribute name="class"><xsl:choose> |
| 151 | + <xsl:when test="number($pctCovered >= $highCoverage)">chc</xsl:when> |
| 152 | + <xsl:when test="number($pctCovered >= $mediumCoverage)">cmc</xsl:when> |
| 153 | + <xsl:otherwise>cbc</xsl:otherwise> |
103 | 154 | </xsl:choose>
|
104 | 155 | </xsl:attribute>
|
105 | 156 | <xsl:value-of select="ClassName"/>
|
106 |
| - </td> |
107 |
| - <td> |
108 |
| - <xsl:if test="$pctCovered > 0"> |
109 |
| - <xsl:value-of select="format-number($pctCovered, '###.##')" />% |
110 |
| - </xsl:if> |
| 157 | + </span> |
| 158 | + <xsl:if test="$pctCovered > 0"><xsl:value-of select="format-number($pctCovered, '###.##')" />%</xsl:if> |
111 | 159 | <xsl:if test="$pctCovered = 0">0.00%</xsl:if>
|
112 |
| - </td> |
113 |
| - </tr> |
114 |
| - </table> |
115 | 160 |
|
116 |
| - <xsl:apply-templates select="./Method" /> |
| 161 | + <table> |
| 162 | + <xsl:apply-templates select="./Method" /> |
| 163 | + </table> |
117 | 164 | </li>
|
118 | 165 |
|
119 | 166 | </xsl:template>
|
|
122 | 169 | <xsl:variable name="pctCovered"
|
123 | 170 | select="(BlocksCovered div (BlocksCovered + BlocksNotCovered)) * 100" />
|
124 | 171 |
|
125 |
| - <table> |
126 |
| - <tr> |
127 |
| - <td width="50"> |
128 |
| - <xsl:if test="$pctCovered > 0"> |
129 |
| - <xsl:value-of select="format-number($pctCovered, '###.##')" />% |
130 |
| - </xsl:if> |
131 |
| - <xsl:if test="$pctCovered = 0">0.00%</xsl:if> |
132 |
| - </td> |
133 |
| - <td> |
134 |
| - <xsl:attribute name="style"> |
135 |
| - text-align: left; |
136 |
| - <xsl:choose> |
137 |
| - <xsl:when test="number($pctCovered >= $highCoverage)">background-color:#86ed60;</xsl:when> |
138 |
| - <xsl:when test="number($pctCovered >= $mediumCoverage)">background-color:#ffff99;</xsl:when> |
139 |
| - <xsl:otherwise>background-color:#eb4848;</xsl:otherwise> |
| 172 | + <tr><td width="50"> |
| 173 | + <xsl:if test="$pctCovered > 0"><xsl:value-of select="format-number($pctCovered, '###.##')" />%</xsl:if> |
| 174 | + <xsl:if test="$pctCovered = 0">0.00%</xsl:if></td><td> |
| 175 | + <xsl:attribute name="class"><xsl:choose> |
| 176 | + <xsl:when test="number($pctCovered >= $highCoverage)">mhc</xsl:when> |
| 177 | + <xsl:when test="number($pctCovered >= $mediumCoverage)">mmc</xsl:when> |
| 178 | + <xsl:otherwise>mbc</xsl:otherwise> |
140 | 179 | </xsl:choose>
|
141 | 180 | </xsl:attribute>
|
142 |
| - <xsl:value-of select="MethodName"/> |
143 |
| - </td> |
144 |
| - |
145 |
| - </tr> |
146 |
| - </table> |
| 181 | + <xsl:value-of select="MethodName"/></td></tr> |
147 | 182 | </xsl:template>
|
148 | 183 |
|
149 | 184 |
|
|
0 commit comments