1
2
3
4
5 package org.w3c.tidy.servlet;
6
7 import com.meterware.httpunit.WebResponse;
8 import com.meterware.httpunit.WebImage;
9
10 /***
11 *
12 *
13 */
14 public class ImageFormatTest extends TidyServletCase {
15
16 /***
17 * Instantiates a new test case.
18 * @param name test name
19 */
20 public ImageFormatTest(String name)
21 {
22 super(name);
23 }
24
25 /***
26 * Check that alt in image set properly.
27 * @throws Exception any axception thrown during test.
28 */
29 public void testAltText() throws Exception
30 {
31 WebResponse response = getResponse();
32
33 WebImage[] img = response.getImages();
34
35 assertEquals("Expected 2 images in result.", 2, img.length);
36
37 assertEquals("alt-text set in config", "Alternate", img[1].getAltText());
38
39 }
40 }