Commit 74a0d209c83ad82b8d0ce6ba4f14bcbb5b913058
1 parent
18f22bf7
Exists in
master
and in
1 other branch
git-svn-id: https://svn.bento.ifrs.edu.br/default/ASES/ASES%20-%20Web/ASES%20-%2…
…0Web/Fontes/avaliador-api@10135 c2178572-b5ca-4887-91d2-9e3a90c7d55b
Showing
1 changed file
with
16 additions
and
0 deletions
Show diff stats
src/test/java/br/com/checker/emag/BehaviorEvaluationTest.java
1 | 1 | package br.com.checker.emag; |
2 | 2 | |
3 | 3 | import static br.com.checker.emag.core.Checker.behavior; |
4 | +import static br.com.checker.emag.core.Checker.content; | |
4 | 5 | import static br.com.checker.emag.core.Checker.from; |
5 | 6 | import static org.junit.Assert.assertEquals; |
6 | 7 | import static org.junit.Assert.assertFalse; |
... | ... | @@ -186,5 +187,20 @@ public class BehaviorEvaluationTest { |
186 | 187 | } |
187 | 188 | |
188 | 189 | |
190 | + @Test | |
191 | + public void shouldCheckRecommedation16() { | |
192 | + | |
193 | + StringBuilder html = new StringBuilder("<html> "); | |
194 | + html.append("</html>"); | |
195 | + | |
196 | + Map<OccurrenceClassification,List<Occurrence>> occurrences = from(html.toString()) | |
197 | + .with(behavior().recommendation16()).check(); | |
198 | + | |
199 | + assertEquals("Should return 1 occurrences", 1,occurrences.get(OccurrenceClassification.BEHAVIOR).size()); | |
200 | + assertEquals("Should return Recommendation 16","2.7",occurrences.get(OccurrenceClassification.BEHAVIOR).get(0).getCode()); | |
201 | + assertFalse("Recommendation 17 should be ERROR",occurrences.get(OccurrenceClassification.BEHAVIOR).get(0).isError()); | |
202 | + } | |
203 | + | |
204 | + | |
189 | 205 | |
190 | 206 | } | ... | ... |