EMMA Coverage Report (generated Fri Feb 13 16:33:40 BRST 2009)
[all classes][br.org.agilcoop.cursos.testes.unidade]

COVERAGE SUMMARY FOR SOURCE FILE [WebUtils.java]

nameclass, %method, %block, %line, %
WebUtils.java0%   (0/1)0%   (0/3)0%   (0/51)0%   (0/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class WebUtils0%   (0/1)0%   (0/3)0%   (0/51)0%   (0/10)
WebUtils (URL): void 0%   (0/1)0%   (0/6)0%   (0/3)
download (String): File 0%   (0/1)0%   (0/43)0%   (0/6)
upload (String): File 0%   (0/1)0%   (0/2)0%   (0/1)

1package br.org.agilcoop.cursos.testes.unidade;
2 
3import java.io.File;
4import java.io.IOException;
5import java.net.URL;
6 
7public class WebUtils {
8        private URL url;
9        
10        public WebUtils(URL url) {
11                this.url = url;
12        }
13 
14        public File download(String path) throws IOException, InterruptedException {
15                String comando = "wget --quiet --no-cache " + url.toString() + "/" + path;
16                Process exec = Runtime.getRuntime().exec(comando);
17                exec.waitFor();
18                String currentDir = System.getProperty("user.dir");
19                String filename = path.replaceAll(".*/", "");
20                return new File(currentDir + "/" + filename);
21        }
22        
23        public File upload(String path) {
24                return null;        
25        }
26}

[all classes][br.org.agilcoop.cursos.testes.unidade]
EMMA 2.0.5312 (C) Vladimir Roubtsov