Browse Source

Test for PR 23862

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275545 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
33df219930
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelperTest.java

+ 10
- 1
src/testcases/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelperTest.java View File

@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* Copyright (c) 2002-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -96,6 +96,11 @@ public class JUnitVersionHelperTest extends TestCase {
assertEquals("unknown", JUnitVersionHelper.getTestCaseName(null));
}

public void testTestCaseSubClass() {
assertEquals("overridden getName",
JUnitVersionHelper.getTestCaseName(new Foo5()));
}

public static class Foo implements Test {
public int countTestCases() {return 0;}
public void run(TestResult result) {}
@@ -116,4 +121,8 @@ public class JUnitVersionHelperTest extends TestCase {
public String name() {return "I'm a foo, too";}
}

public static class Foo5 extends TestCase {
public String getName() {return "overridden getName";}
}

}

Loading…
Cancel
Save