Restructured tests and samples
This commit is contained in:
parent
9378ff1a7e
commit
1d766344c6
10 changed files with 23 additions and 8 deletions
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package com.rometools.test;
|
||||
package com.rometools.fetcher;
|
||||
|
||||
import java.net.URL;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package com.rometools.test;
|
||||
package com.rometools.fetcher;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package com.rometools.test;
|
||||
package com.rometools.fetcher;
|
||||
|
||||
import java.net.Authenticator;
|
||||
import java.net.PasswordAuthentication;
|
|
@ -1,4 +1,4 @@
|
|||
package com.rometools.test;
|
||||
package com.rometools.fetcher.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URL;
|
|
@ -1,4 +1,4 @@
|
|||
package com.rometools.test;
|
||||
package com.rometools.fetcher.impl;
|
||||
|
||||
import java.net.URL;
|
||||
|
|
@ -14,11 +14,12 @@
|
|||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package com.rometools.test;
|
||||
package com.rometools.fetcher.impl;
|
||||
|
||||
import org.apache.commons.httpclient.Credentials;
|
||||
import org.apache.commons.httpclient.UsernamePasswordCredentials;
|
||||
|
||||
import com.rometools.fetcher.AbstractJettyTest;
|
||||
import com.rometools.fetcher.FeedFetcher;
|
||||
import com.rometools.fetcher.impl.FeedFetcherCache;
|
||||
import com.rometools.fetcher.impl.HttpClientFeedFetcher;
|
|
@ -14,9 +14,11 @@
|
|||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package com.rometools.test;
|
||||
package com.rometools.fetcher.impl;
|
||||
|
||||
import com.rometools.fetcher.AbstractJettyTest;
|
||||
import com.rometools.fetcher.FeedFetcher;
|
||||
import com.rometools.fetcher.TestBasicAuthenticator;
|
||||
import com.rometools.fetcher.impl.FeedFetcherCache;
|
||||
import com.rometools.fetcher.impl.HttpURLFeedFetcher;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package com.rometools.test;
|
||||
package com.rometools.fetcher.impl;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
|
@ -47,9 +47,13 @@ import com.rometools.rome.io.SyndFeedOutput;
|
|||
public class FeedAggregator {
|
||||
|
||||
public static void main(final String[] args) {
|
||||
|
||||
boolean ok = false;
|
||||
|
||||
if (args.length >= 2) {
|
||||
|
||||
try {
|
||||
|
||||
final String outputType = args[0];
|
||||
|
||||
final SyndFeed feed = new SyndFeedImpl();
|
||||
|
@ -76,10 +80,12 @@ public class FeedAggregator {
|
|||
output.output(feed, new PrintWriter(System.out));
|
||||
|
||||
ok = true;
|
||||
|
||||
} catch (final Exception ex) {
|
||||
System.out.println("ERROR: " + ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!ok) {
|
|
@ -36,9 +36,13 @@ import com.rometools.rome.feed.synd.SyndFeed;
|
|||
*
|
||||
*/
|
||||
public class FeedReader {
|
||||
|
||||
public static void main(final String[] args) {
|
||||
|
||||
boolean ok = false;
|
||||
|
||||
if (args.length == 1) {
|
||||
|
||||
try {
|
||||
final URL feedUrl = new URL(args[0]);
|
||||
final FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
|
||||
|
@ -64,10 +68,12 @@ public class FeedReader {
|
|||
System.err.println("If a \"Feed Unchanged\" event fired then the server supports conditional gets.");
|
||||
|
||||
ok = true;
|
||||
|
||||
} catch (final Exception ex) {
|
||||
System.out.println("ERROR: " + ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!ok) {
|
Loading…
Reference in a new issue