001/* $Id: RssTestCase.java 1102402 2011-05-12 18:03:26Z simonetripodi $ 002 * 003 * Licensed to the Apache Software Foundation (ASF) under one or more 004 * contributor license agreements. See the NOTICE file distributed with 005 * this work for additional information regarding copyright ownership. 006 * The ASF licenses this file to You under the Apache License, Version 2.0 007 * (the "License"); you may not use this file except in compliance with 008 * the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.apache.commons.digester3.annotations.rss; 019 020import org.apache.commons.digester3.annotations.AbstractAnnotatedPojoTestCase; 021import org.junit.Test; 022 023/** 024 * @since 2.1 025 */ 026public final class RssTestCase 027 extends AbstractAnnotatedPojoTestCase 028{ 029 030 @Test 031 public void testRss() 032 throws Exception 033 { 034 Channel channel = new Channel(); 035 channel.setTitle( "Apache" ); 036 channel.setLink( "http://www.apache.org" ); 037 channel.setDescription( "The Apache Software Foundation" ); 038 channel.setLanguage( "en-US" ); 039 040 Image image = new Image(); 041 image.setTitle( "Apache" ); 042 image.setUrl( "http://jakarta.apache.org/images/jakarta-logo.gif" ); 043 image.setLink( "http://jakarta.apache.org" ); 044 image.setDescription( "The Jakarta project. Open source, serverside java." ); 045 image.setWidth( 505 ); 046 image.setHeight( 480 ); 047 channel.setImage( image ); 048 049 Item item = new Item(); 050 item.setTitle( "Commons Attributes 2.1 Released" ); 051 item.setLink( "http://jakarta.apache.org/site/news/news-2004-2ndHalf.html#20040815.1" ); 052 item.setDescription( "The Apache Commons team is happy to announce the release of Commons Attributes 2.1. This is the first release of the new Commons-Attributes code." ); 053 channel.addItem( item ); 054 055 item = new Item(); 056 item.setTitle( "Cloudscape Becomes Apache Derby" ); 057 item.setLink( "http://jakarta.apache.org/site/news/elsewhere-2004-2ndHalf.html#20040803.1" ); 058 item.setDescription( "IBM has submitted a proposal to the Apache DB project for a Java-based package to be called 'Derby'." ); 059 channel.addItem( item ); 060 061 item = new Item(); 062 item.setTitle( "Commons BeanUtils 1.7 Released" ); 063 item.setLink( "http://jakarta.apache.org/site/news/news-2004-2ndHalf.html#20040802.1" ); 064 item.setDescription( "" ); 065 channel.addItem( item ); 066 067 item = new Item(); 068 item.setTitle( "Commons JXPath 1.2 Released" ); 069 item.setLink( "http://jakarta.apache.org/site/news/news-2004-2ndHalf.html#20040801.2" ); 070 item.setDescription( "" ); 071 channel.addItem( item ); 072 073 this.verifyExpectedEqualsToParsed( channel ); 074 } 075 076}