Clover coverage report - EasyMock 2.2
Coverage timestamp: Mo Apr 17 2006 21:21:22 CEST
file stats: LOC: 25   Methods: 3
NCLOC: 15   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
Matches.java - 100% 100% 100%
coverage
 1    /*
 2    * Copyright (c) 2001-2006 OFFIS, Tammo Freese.
 3    * This program is made available under the terms of the MIT License.
 4    */
 5    package org.easymock.internal.matchers;
 6   
 7    import org.easymock.IArgumentMatcher;
 8   
 9    public class Matches implements IArgumentMatcher {
 10   
 11    private final String regex;
 12   
 13  3 public Matches(String regex) {
 14  3 this.regex = regex;
 15    }
 16   
 17  4 public boolean matches(Object actual) {
 18  4 return (actual instanceof String) && ((String) actual).matches(regex);
 19    }
 20   
 21  1 public void appendTo(StringBuffer buffer) {
 22  1 buffer.append("matches(\"" + regex.replaceAll("\\\\", "\\\\\\\\")
 23    + "\")");
 24    }
 25    }