1 16 package org.apache.cocoon; 17 18 27 public class ReaderMimeTypeTestCase 28 extends HtmlUnitTestCase 29 { 30 static final String pageurl = "/samples/test/reader-mime-type/"; 31 32 35 public void test10() 36 throws Exception 37 { 38 call10(); 39 call10(); 40 } 41 42 private void call10() 43 throws Exception 44 { 45 loadResponse(pageurl+"test10.xml"); 46 assertEquals("Content type should be undefined", "", response.getContentType()); 47 } 48 49 52 public void test20() 53 throws Exception 54 { 55 call20(); 56 call20(); 57 } 58 59 private void call20() 60 throws Exception 61 { 62 loadResponse(pageurl+"test20.x20"); 63 assertEquals("Content type", "text/xml", response.getContentType()); 64 } 65 66 69 public void test30() 70 throws Exception 71 { 72 call30(); 73 call30(); 74 } 75 76 private void call30() 77 throws Exception 78 { 79 loadResponse(pageurl+"test30.x30"); 80 assertEquals("Content type", "text/xml", response.getContentType()); 81 } 82 83 86 public void test40() 87 throws Exception 88 { 89 call40(); 90 call40(); 91 } 92 93 private void call40() 94 throws Exception 95 { 96 loadResponse(pageurl+"test40.x40"); 97 assertEquals("Content type", "text/xml", response.getContentType()); 98 } 99 100 104 public void test50() 105 throws Exception 106 { 107 call50(); 108 call50(); 109 } 110 111 private void call50() 112 throws Exception 113 { 114 loadResponse(pageurl+"test50.xml"); 115 assertEquals("Content type should be undefined", "", response.getContentType()); 116 } 117 118 121 public void test60() 122 throws Exception 123 { 124 call60(); 125 call60(); 126 } 127 128 private void call60() 129 throws Exception 130 { 131 loadResponse(pageurl+"test60.x60"); 132 assertEquals("Content type", "text/xml", response.getContentType()); 133 } 134 135 138 public void test70() 139 throws Exception 140 { 141 call70(); 142 call70(); 143 } 144 145 private void call70() 146 throws Exception 147 { 148 loadResponse(pageurl+"test70.x70"); 149 assertEquals("Content type", "text/xml", response.getContentType()); 150 } 151 } 152 | Popular Tags |