1
2
3
4
5
6
7 package org.mule.module.rss;
8
9 import org.mule.util.IOUtils;
10
11 import java.io.IOException;
12 import java.io.InputStream;
13
14 import static org.junit.Assert.assertNotNull;
15
16
17
18
19 public class SampleFeed
20 {
21 public static final int ENTRIES_IN_RSS_FEED = 25;
22 private static final String FEED_FILE = "sample-feed.rss";
23
24 public static String feedAsString() throws IOException
25 {
26 return IOUtils.getResourceAsString(FEED_FILE, SampleFeed.class);
27 }
28
29 public static InputStream feedAsStream() throws IOException
30 {
31 InputStream stream = IOUtils.getResourceAsStream(FEED_FILE, SampleFeed.class);
32 assertNotNull(stream);
33 return stream;
34 }
35 }