| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
package org.apache.commons.beanutils.bugs; |
| 18 |
|
|
| 19 |
|
import org.apache.commons.beanutils.PropertyUtils; |
| 20 |
|
import org.apache.commons.beanutils.bugs.other.Jira87BeanFactory; |
| 21 |
|
import org.apache.commons.logging.Log; |
| 22 |
|
import org.apache.commons.logging.LogFactory; |
| 23 |
|
import junit.framework.Test; |
| 24 |
|
import junit.framework.TestCase; |
| 25 |
|
import junit.framework.TestSuite; |
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
@link |
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
|
| 39 |
|
@version |
| 40 |
|
|
|
|
|
| 75% |
Uncovered Elements: 4 (16) |
Complexity: 7 |
Complexity Density: 0.7 |
|
| 41 |
|
public class Jira87TestCase extends TestCase { |
| 42 |
|
|
| 43 |
|
private Log log = LogFactory.getLog(Jira87TestCase.class); |
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
@param |
| 49 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 50 |
1
|
public Jira87TestCase(String name) {... |
| 51 |
1
|
super(name); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
@param |
| 58 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 59 |
0
|
public static void main(String[] args) {... |
| 60 |
0
|
junit.textui.TestRunner.run(suite()); |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
@return |
| 67 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 68 |
1
|
public static Test suite() {... |
| 69 |
1
|
return (new TestSuite(Jira87TestCase.class)); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
@throws |
| 76 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 77 |
1
|
protected void setUp() throws Exception {... |
| 78 |
1
|
super.setUp(); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
@throws |
| 85 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 86 |
1
|
protected void tearDown() throws Exception {... |
| 87 |
1
|
super.tearDown(); |
| 88 |
|
} |
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
|
|
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.4 |
1
PASS
|
|
| 93 |
1
|
public void testJira87() {... |
| 94 |
|
|
| 95 |
1
|
Jira87BeanFactory.PublicMappedInterface bean = Jira87BeanFactory.createMappedPropertyBean(); |
| 96 |
1
|
try { |
| 97 |
|
|
| 98 |
1
|
assertEquals("foo", PropertyUtils.getMappedProperty(bean, "value(foo)")); |
| 99 |
|
} catch (Throwable t) { |
| 100 |
0
|
log.error("ERROR " + t, t); |
| 101 |
0
|
fail("Threw exception: " + t); |
| 102 |
|
} |
| 103 |
|
} |
| 104 |
|
} |