Changeset 1698


Ignore:
Timestamp:
03/15/2008 03:17:07 PM (7 years ago)
Author:
mosipov
Message:

CLOSED - #2005: Test Cases für UploadResponse have to be reworked

File:
1 edited

Legend:

Unmodified
Added
Removed
  • FCKeditor.Java/branches/2.4/src/test/java/net/fckeditor/tool/UploadResponseTest.java

    r1690 r1698  
    2323                new UploadResponse("1"); 
    2424        } 
    25 /* 
     25 
    2626        @Test 
    2727        public void onlyErrorNumber() throws Exception { 
    28                 UploadResponse actual = UploadResponse.UR_INVALID_EXTENSION; 
     28                UploadResponse actual = new UploadResponse( 
     29                                UploadResponse.EN_INVALID_EXTENSION); 
    2930                String expected = new String("<script type=\"text/javascript\">\n" 
    3031                                + "window.parent.OnUploadCompleted(202);\n</script>"); 
    3132                assertEquals(expected, actual.toString()); 
    3233        } 
    33         */ 
     34         
    3435        @Test 
    3536        public void fourArguments() throws Exception { 
     
    4748                assertEquals(expected, actual.toString()); 
    4849        } 
    49 /*       
     50 
    5051        @Test 
    5152        public void customMessage() throws Exception { 
    5253                UploadResponse actual = new UploadResponse(UploadResponse.EN_ERROR); 
    53                 actual.setCustomMessage(UploadResponse.CM_HTTP_400); 
     54                actual.setCustomMessage("some error"); 
    5455                String expected = new String("<script type=\"text/javascript\">\n" 
    55                                 + "window.parent.OnUploadCompleted(1,'','','400 Bad request');\n</script>"); 
     56                                + "window.parent.OnUploadCompleted(1,'','','some error');\n</script>"); 
    5657                assertEquals(expected, actual.toString()); 
    5758        } 
    58 */ 
    59 /* 
     59 
     60 
    6061        @Test 
    6162        public void nullArguments() throws Exception { 
    62                 UploadResponse actual = new UploadResponse(UploadResponse.EN_GENERIC_NUMBER,null,null,null); 
     63                UploadResponse actual = new UploadResponse(UploadResponse.EN_ERROR,null,null,null); 
    6364                String expected = new String("<script type=\"text/javascript\">\n" 
    64                                 + "window.parent.OnUploadCompleted(-1,'','','');\n</script>"); 
     65                                + "window.parent.OnUploadCompleted(1,'','','');\n</script>"); 
    6566                assertEquals(expected, actual.toString()); 
    6667        } 
    67 */ 
     68 
    6869} 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy