|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Not | Line # 11 | 5 | 3 | 100% |
1.0
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (5) | |||
| Result | |||
|
0.75
|
org.easymock.tests2.ConstraintsToStringTest.notToString
org.easymock.tests2.ConstraintsToStringTest.notToString
|
1 PASS | |
|
0.5
|
org.easymock.tests2.UsageConstraintsTest.testNotNull
org.easymock.tests2.UsageConstraintsTest.testNotNull
|
1 PASS | |
|
0.5
|
org.easymock.tests2.UsageConstraintsTest.testNull
org.easymock.tests2.UsageConstraintsTest.testNull
|
1 PASS | |
|
0.5
|
org.easymock.tests2.UsageConstraintsTest.notOverloaded
org.easymock.tests2.UsageConstraintsTest.notOverloaded
|
1 PASS | |
|
0.25
|
org.easymock.tests2.UsageConstraintsTest.equalsMissing
org.easymock.tests2.UsageConstraintsTest.equalsMissing
|
1 PASS | |
| 1 | /* | |
| 2 | * Copyright (c) 2001-2008 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 java.io.Serializable; | |
| 8 | ||
| 9 | import org.easymock.IArgumentMatcher; | |
| 10 | ||
| 11 | public class Not implements IArgumentMatcher, Serializable { | |
| 12 | ||
| 13 | private static final long serialVersionUID = -5160559075998939348L; | |
| 14 | ||
| 15 | private final IArgumentMatcher first; | |
| 16 | ||
| 17 | 14 |
public Not(IArgumentMatcher first) { |
| 18 | 14 | this.first = first; |
| 19 | } | |
| 20 | ||
| 21 | 12 |
public boolean matches(Object actual) { |
| 22 | 12 | return !first.matches(actual); |
| 23 | } | |
| 24 | ||
| 25 | 1 |
public void appendTo(StringBuffer buffer) { |
| 26 | 1 | buffer.append("not("); |
| 27 | 1 | first.appendTo(buffer); |
| 28 | 1 | buffer.append(")"); |
| 29 | } | |
| 30 | } | |
|
||||||||||