Project

General

Profile

« Previous | Next » 

Revision 3538

Added by barteau about 17 years ago

Fixed some bugs.

View differences:

test/edu/ucsb/nceas/metacat/clientview/ClientViewHelperTest.java
95 95
        
96 96
        System.out.print("...download (data file)");
97 97
        clientViewBean.setAction("Download");
98
        clientViewBean.setDocId("DOWNLOAD_DATA_DOCID");
99
        clientViewBean.setMetaFileDocId("DOWNLOAD_PACKAGE_DOCID");
98
        clientViewBean.setDocId(DOWNLOAD_DATA_DOCID);
99
        clientViewBean.setMetaFileDocId(DOWNLOAD_PACKAGE_DOCID);
100 100
        
101 101
        result = instance.handleClientRequest(null);
102 102
        returnResultTxt = (String) result.get("contentType");
......
109 109
        
110 110
        
111 111
        System.out.print("...download (package zip file)");
112
        clientViewBean.setDocId("DOWNLOAD_PACKAGE_DOCID");
113
        clientViewBean.setMetaFileDocId("DOWNLOAD_PACKAGE_DOCID");
112
        clientViewBean.setDocId(DOWNLOAD_PACKAGE_DOCID);
113
        clientViewBean.setMetaFileDocId(DOWNLOAD_PACKAGE_DOCID);
114 114
        
115 115
        result = instance.handleClientRequest(null);
116 116
        returnResultTxt = (String) result.get("contentType");
117
        assertEquals("Download: Content Type is incorrect for a data file download", returnResultTxt, "application/zip");
117
        assertEquals("Download: Content Type is incorrect for a package download", returnResultTxt, "application/zip");
118 118
        returnResultTxt = (String) result.get("Content-Disposition");
119 119
        assertNotNull("Download: Content-Disposition is not set", returnResultTxt);
120 120
        assertNotNull("Download: OutputStream is not set", result.get("outputStream"));

Also available in: Unified diff