1 | /*
|
---|
2 | * Copyright 2002,2004 The Apache Software Foundation
|
---|
3 | *
|
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | * you may not use this file except in compliance with the License.
|
---|
6 | * You may obtain a copy of the License at
|
---|
7 | *
|
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 | *
|
---|
10 | * Unless required by applicable law or agreed to in writing, software
|
---|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
13 | * See the License for the specific language governing permissions and
|
---|
14 | * limitations under the License.
|
---|
15 | *
|
---|
16 | */
|
---|
17 |
|
---|
18 | package org.apache.tools.ant.taskdefs.optional.junit;
|
---|
19 |
|
---|
20 | import java.io.File;
|
---|
21 | import org.apache.tools.ant.BuildFileTest;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * Small testcase for the junitreporttask.
|
---|
25 | * First test added to reproduce an fault, still a lot to improve
|
---|
26 | *
|
---|
27 | */
|
---|
28 | public class JUnitReportTest extends BuildFileTest {
|
---|
29 |
|
---|
30 | public JUnitReportTest(String name){
|
---|
31 | super(name);
|
---|
32 | }
|
---|
33 |
|
---|
34 | protected void setUp() {
|
---|
35 | configureProject("src/etc/testcases/taskdefs/optional/junitreport.xml");
|
---|
36 | }
|
---|
37 |
|
---|
38 | protected void tearDown() {
|
---|
39 | executeTarget("clean");
|
---|
40 | }
|
---|
41 |
|
---|
42 | /**
|
---|
43 | * Verifies that no empty junit-noframes.html is generated when frames
|
---|
44 | * output is selected via the default.
|
---|
45 | * Needs reports1 task from junitreport.xml.
|
---|
46 | */
|
---|
47 | public void testNoFileJUnitNoFrames() {
|
---|
48 | executeTarget("reports1");
|
---|
49 | if (new File("src/etc/testcases/taskdefs/optional/junitreport/test/html/junit-noframes.html").exists())
|
---|
50 | {
|
---|
51 | fail("No file junit-noframes.html expected");
|
---|
52 | }
|
---|
53 | }
|
---|
54 |
|
---|
55 | }
|
---|
56 |
|
---|