チェンジセット 985
- コミット日時:
- 2008/08/20 02:25:42 (3 年前)
- ファイル:
-
- as3/Syndication/trunk (更新) (1 prop)
- as3/Syndication/trunk/samples (更新) (1 prop)
- as3/Syndication/trunk/src (更新) (1 prop)
- as3/Syndication/trunk/src/org/libspark/syndication/AtomFeed.as (更新) (4 diffs)
- as3/Syndication/trunk/src/org/libspark/syndication/AtomFeedEntry.as (更新) (5 diffs)
- as3/Syndication/trunk/src/org/libspark/syndication/Feed.as (更新) (4 diffs)
- as3/Syndication/trunk/src/org/libspark/syndication/IFeed.as (更新) (1 diff)
- as3/Syndication/trunk/src/org/libspark/syndication/IFeedEntry.as (更新) (1 diff)
- as3/Syndication/trunk/src/org/libspark/syndication/RSS2Feed.as (更新) (4 diffs)
- as3/Syndication/trunk/src/org/libspark/syndication/RSS2FeedEntry.as (更新) (5 diffs)
- as3/Syndication/trunk/src/org/libspark/syndication/RSSFeed.as (更新) (5 diffs)
- as3/Syndication/trunk/src/org/libspark/syndication/RSSFeedEntry.as (更新) (5 diffs)
- as3/Syndication/trunk/src/org/libspark/syndication/errors (追加)
- as3/Syndication/trunk/src/org/libspark/syndication/errors/UnknownFeedError.as (追加)
- as3/Syndication/trunk/src/org/libspark/syndication/namespaces (更新) (1 prop)
- as3/Syndication/trunk/src/org/libspark/syndication/namespaces/atom.as (更新) (1 diff)
- as3/Syndication/trunk/src/org/libspark/syndication/namespaces/atom03.as (追加)
- as3/Syndication/trunk/src/org/libspark/syndication/namespaces/content.as (更新) (1 diff)
- as3/Syndication/trunk/src/org/libspark/syndication/namespaces/dc.as (更新) (1 diff)
- as3/Syndication/trunk/src/org/libspark/syndication/namespaces/rdf.as (更新) (1 diff)
- as3/Syndication/trunk/src/org/libspark/syndication/namespaces/rss.as (更新) (1 diff)
- as3/Syndication/trunk/src/org/libspark/syndication/namespaces/syndication.as (追加)
- as3/Syndication/trunk/src/org/libspark/syndication/utils/DateUtil.as (更新) (3 diffs)
- as3/Syndication/trunk/tests (更新) (1 prop)
- as3/Syndication/trunk/tests/org/libspark/syndication/AllTests.as (更新) (2 diffs)
- as3/Syndication/trunk/tests/org/libspark/syndication/AtomFeedEntryTests.as (更新) (9 diffs)
- as3/Syndication/trunk/tests/org/libspark/syndication/AtomFeedTests.as (更新) (6 diffs)
- as3/Syndication/trunk/tests/org/libspark/syndication/FeedTests.as (更新) (1 diff)
- as3/Syndication/trunk/tests/org/libspark/syndication/RSS2FeedEntryTests.as (更新) (15 diffs)
- as3/Syndication/trunk/tests/org/libspark/syndication/RSS2FeedTests.as (更新) (6 diffs)
- as3/Syndication/trunk/tests/org/libspark/syndication/RSSFeedEntryTests.as (更新) (9 diffs)
- as3/Syndication/trunk/tests/org/libspark/syndication/RSSFeedTests.as (更新) (6 diffs)
- as3/Syndication/trunk/tests/org/libspark/syndication/utils/DateUtilTests.as (追加)
- as3/Syndication/trunk/tests/org/libspark/syndication/utils/UtilsAllTests.as (追加)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/Syndication/trunk
- 属性の設定値: svn:ignore (変更前)
(変更後)
log.txt
.DS_Store
- 属性の設定値: svn:ignore (変更前)
as3/Syndication/trunk/samples
- 属性の設定値: svn:ignore (登録)
.DS_Store
- 属性の設定値: svn:ignore (登録)
as3/Syndication/trunk/src
- 属性の設定値: svn:ignore (登録)
.DS_Store
- 属性の設定値: svn:ignore (登録)
as3/Syndication/trunk/src/org/libspark/syndication/AtomFeed.as
r963 r985 16 16 17 17 /** 18 * AtomFeed.18 * IFeed インターフェイスの実装クラスで Atom に対応した実装を提供します。 19 19 */ 20 20 public class AtomFeed implements IFeed 21 21 { 22 22 /** 23 * a reference of raw data.23 * フィードのデータを保持します。 24 24 */ 25 25 private var _data:XML; … … 42 42 43 43 /** 44 * a reference of entries.44 * エントリーの情報を保持します。 45 45 */ 46 46 private var _entries:Array; … … 63 63 64 64 /** 65 * Constructor. 65 * 新しい AtomFeed クラスのインスタンスを作成します。 66 * 67 * @param data atom フィードの XML 66 68 */ 67 69 public function AtomFeed(data:XML) … … 79 81 } 80 82 } 83 as3/Syndication/trunk/src/org/libspark/syndication/AtomFeedEntry.as
r963 r985 17 17 18 18 /** 19 * AtomFeedEntry.19 * IFeedEntry インターフェイスの実装クラスで Atom に対応した実装を提供します。 20 20 */ 21 21 public class AtomFeedEntry implements IFeedEntry 22 22 { 23 23 /** 24 * a reference of raw data.24 * エントリーのデータを保持します。 25 25 */ 26 26 private var _data:XML; … … 59 59 60 60 /** 61 * a reference of parsed published.61 * 公開日の情報を保持します。 62 62 */ 63 63 private var _published:Date; … … 76 76 77 77 /** 78 * a reference of categories.78 * カテゴリーの情報を保持します。 79 79 */ 80 80 private var _categories:Array; … … 97 97 98 98 /** 99 * Constructor. 99 * 新しい AtomFeedEntry クラスのインスタンスを作成します。 100 * 101 * @param data Atom エントリーの XML 100 102 */ 101 103 public function AtomFeedEntry(data:XML) … … 113 115 } 114 116 } 117 as3/Syndication/trunk/src/org/libspark/syndication/Feed.as
r963 r985 11 11 package org.libspark.syndication 12 12 { 13 import flash.errors.IllegalOperationError; 13 14 import flash.utils.getQualifiedClassName; 15 import org.libspark.syndication.errors.UnknownFeedError; 14 16 import org.libspark.syndication.namespaces.rss; 15 17 import org.libspark.syndication.namespaces.atom; … … 66 68 67 69 /** 70 * フィードをパースする 68 71 * 72 * @param data Feedの文字列かXML 73 * @return Feedオブジェクト 74 * @throws 75 * IllegalOperationError 76 * UnknownFeedError 69 77 */ 70 public static function parse(data String:String):Feed78 public static function parse(data:*):Feed 71 79 { 72 var data:XML = XML(dataString); 80 // 文字列ならばXMLへキャスト 81 if (data is String) 82 { 83 data = XML(data); 84 } 85 86 // dataがXMLで無ければExceptionを投げる 87 if (data is XML === false) 88 { 89 throw new IllegalOperationError('first argument must be String or XML.'); 90 } 91 73 92 var localName:String = data.localName(); 74 93 var version:String = data.@version.toString(); 75 94 var nsList:Array = data.namespaceDeclarations(); 76 nsList = nsList.map(function (...a):String { return a[0]. toString(); });95 nsList = nsList.map(function (...a):String { return a[0].uri.toLowerCase(); }); 77 96 78 97 var adapter:IFeed; … … 91 110 else 92 111 { 93 throw new ArgumentError("invalid argument. "+dataString);112 throw new UnknownFeedError("Unable to determine feed type."); 94 113 } 95 114 return new Feed(adapter); … … 97 116 } 98 117 } 118 as3/Syndication/trunk/src/org/libspark/syndication/IFeed.as
r963 r985 12 12 { 13 13 /** 14 * feed object interface.14 * フィードクラスのメソッドを提供します。 15 15 */ 16 16 public interface IFeed 17 17 { 18 18 /** 19 * get title attribute.19 * フィードのタイトルを取得します。 20 20 */ 21 21 function get title():String; 22 22 23 23 /** 24 * get link attribute.24 * フィードのリンクを取得します。 25 25 */ 26 26 function get link():String; 27 27 28 28 /** 29 * get entries.29 * フィードのエントリーを取得します。 30 30 */ 31 31 function get entries():Array; 32 32 33 33 /** 34 * representation the object string format.34 * フィードクラスの文字列表現を取得します。 35 35 */ 36 36 function toString():String; 37 37 } 38 38 } 39 as3/Syndication/trunk/src/org/libspark/syndication/IFeedEntry.as
r963 r985 12 12 { 13 13 /** 14 * feed entry interface.14 * フィードエントリークラスのメソッドを提供します。 15 15 */ 16 16 public interface IFeedEntry 17 17 { 18 18 /** 19 * get author name. 20 * 21 * RSS 1.0 22 * - dc::creator 23 * RSS 2.0 24 * - dc::creator 25 * ATOM 26 * - author/name 19 * エントリーの著者を取得します。 27 20 */ 28 21 function get author():String; 29 22 30 23 /** 31 * get title. 32 * 33 * RSS 1.0 34 * - title 35 * RSS 2.0 36 * - title 37 * ATOM 38 * - title 24 * エントリーのタイトルを取得します。 39 25 */ 40 26 function get title():String; 41 27 42 28 /** 43 * get permalink url. 44 * 45 * RSS 1.0 46 * - link 47 * RSS 2.0 48 * - link 49 * ATOM 50 * - link@href 29 * エントリーのパーマリンクを取得します。 51 30 */ 52 31 function get link():String; 53 32 54 33 /** 55 * get description. 56 * 57 * RSS 1.0 58 * - content::encoded 59 * RSS 2.0 60 * - description 61 * ATOM 62 * - content 34 * エントリーの詳細を取得します。 63 35 */ 64 36 function get description():String; 65 37 66 38 /** 67 * get published date. 68 * 69 * RSS 1.0 70 * - dc::date 71 * RSS 2.0 72 * - pubDate 73 * ATOM 74 * - published 39 * エントリーの公開日を取得します。 75 40 */ 76 41 function get published():Date; 77 42 78 43 /** 79 * get categories. 80 * 81 * RSS 1.0 82 * - dc:subject 83 * RSS 2.0 84 * - category 85 * ATOM 86 * - category@term 44 * エントリーのカテゴリーを取得します。 87 45 */ 88 46 function get categories():Array; 89 47 90 48 /** 91 * representation the object string format.49 * エントリークラスの文字列表現を取得します。 92 50 */ 93 51 function toString():String; 94 52 } 95 53 } 54 as3/Syndication/trunk/src/org/libspark/syndication/RSS2Feed.as
r963 r985 18 18 19 19 /** 20 * RSS2Feed.20 * IFeed インターフェイスの実装クラスで RSS 2.0 に対応した実装を提供します。 21 21 */ 22 22 public class RSS2Feed implements IFeed 23 23 { 24 24 /** 25 * a reference of raw data.25 * フィードのデータを保持します。 26 26 */ 27 27 private var _data:XML; … … 44 44 45 45 /** 46 * a reference of entries.46 * エントリーの情報を保持します。 47 47 */ 48 48 private var _entries:Array; … … 65 65 66 66 /** 67 * Constructor. 67 * 新しい RSS2Feed クラスのインスタンスを作成します。 68 * 69 * @param data rss 2.0 フィードの XML 68 70 */ 69 71 public function RSS2Feed(data:XML) … … 81 83 } 82 84 } 85 as3/Syndication/trunk/src/org/libspark/syndication/RSS2FeedEntry.as
r963 r985 19 19 20 20 /** 21 * RSS2FeedEntry.21 * IFeedEntry インターフェイスの実装クラスで RSS 2.0 に対応した実装を提供します。 22 22 */ 23 23 public class RSS2FeedEntry implements IFeedEntry 24 24 { 25 25 /** 26 * a reference of raw data.26 * エントリーのデータを保持します。 27 27 */ 28 28 private var _data:XML; … … 61 61 62 62 /** 63 * a reference of published.63 * 公開日の情報を保持します。 64 64 */ 65 65 private var _published:Date; … … 78 78 79 79 /** 80 * a reference of categories.80 * カテゴリーの情報を保持します。 81 81 */ 82 82 private var _categories:Array; … … 99 99 100 100 /** 101 * Constructor. 101 * 新しい RSS2FeedEntry クラスのインスタンスを作成します。 102 * 103 * @param data RSS 2.0 エントリーの XML 102 104 */ 103 105 public function RSS2FeedEntry(data:XML) … … 115 117 } 116 118 } 119 as3/Syndication/trunk/src/org/libspark/syndication/RSSFeed.as
r951 r985 1 /** 2 * ActionScript Syndication Library 3 * 4 * Copyright (c) 2008 Takanobu Izukawa (humming.via-kitchen.com) and 5 * Spark project (www.libspark.org) 6 * 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 */ 1 11 package org.libspark.syndication 2 12 { … … 12 22 13 23 /** 14 * RSSFeed.24 * IFeed インターフェイスの実装クラスで RSS 1.0 に対応した実装を提供します。 15 25 */ 16 26 public class RSSFeed implements IFeed 17 27 { 18 28 /** 19 * a reference of raw data.29 * フィードのデータを保持します。 20 30 */ 21 31 private var _data:XML; … … 38 48 39 49 /** 40 * a reference of entries.50 * エントリーの情報を保持します。 41 51 */ 42 52 private var _entries:Array; 43 53 44 54 /** 45 * 55 * @inheritDoc 46 56 */ 47 57 public function get entries():Array … … 59 69 60 70 /** 61 * Constructor.71 * 新しい RSSFeed クラスのインスタンスを作成します。 62 72 */ 63 73 public function RSSFeed(data:XML) … … 75 85 } 76 86 } 87 as3/Syndication/trunk/src/org/libspark/syndication/RSSFeedEntry.as
r963 r985 23 23 24 24 /** 25 * RSSFeedEntry.25 * IFeedEntry インターフェイスの実装クラスで RSS 1.0 に対応した実装を提供します。 26 26 */ 27 27 public class RSSFeedEntry implements IFeedEntry 28 28 { 29 29 /** 30 * a reference of raw data.30 * エントリーのデータを保持します。 31 31 */ 32 32 private var _data:XML; … … 65 65 66 66 /** 67 * a reference of published.67 * 公開日の情報を保持します。 68 68 */ 69 69 private var _published:Date; … … 82 82 83 83 /** 84 * a reference of categories.84 * カテゴリーの情報を保持します。 85 85 */ 86 86 private var _categories:Array; … … 103 103 104 104 /** 105 * Constructor. 105 * 新しい RSSFeedEntry クラスのインスタンスを作成します。 106 * 107 * @param data RSS 1.0 エントリーの XML 106 108 */ 107 109 public function RSSFeedEntry(data:XML) … … 119 121 } 120 122 } 123 as3/Syndication/trunk/src/org/libspark/syndication/namespaces
- 属性の設定値: svn:ignore (登録)
.DS_Store
- 属性の設定値: svn:ignore (登録)
as3/Syndication/trunk/src/org/libspark/syndication/namespaces/atom.as
r963 r985 13 13 public namespace atom = "http://www.w3.org/2005/Atom"; 14 14 } 15 as3/Syndication/trunk/src/org/libspark/syndication/namespaces/content.as
r963 r985 13 13 public namespace content = "http://purl.org/rss/1.0/modules/content/"; 14 14 } 15 as3/Syndication/trunk/src/org/libspark/syndication/namespaces/dc.as
r963 r985 13 13 public namespace dc = "http://purl.org/dc/elements/1.1/"; 14 14 } 15 as3/Syndication/trunk/src/org/libspark/syndication/namespaces/rdf.as
r963 r985 13 13 public namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 14 14 } 15 as3/Syndication/trunk/src/org/libspark/syndication/namespaces/rss.as
r963 r985 13 13 public namespace rss = "http://purl.org/rss/1.0/"; 14 14 } 15 as3/Syndication/trunk/src/org/libspark/syndication/utils/DateUtil.as
r963 r985 12 12 { 13 13 /** 14 * DateUtil.14 * 日付関連のユーティリティメソッドを提供します。 15 15 */ 16 16 public class DateUtil … … 26 26 */ 27 27 public static const DAY_NAMES_SHORT:Array = [ 28 'Mon', 'Tue', 'Wed', 'Thu', 29 'Fri','Sat', 'Sun' 28 'Sun', 29 'Mon', 30 'Tue', 31 'Wed', 32 'Thu', 33 'Fri', 34 'Sat' 30 35 ]; 31 36 … … 157 162 } 158 163 } 164 as3/Syndication/trunk/tests
- 属性の設定値: svn:ignore (変更前)
log.txt
.DS_Store
*.swf
(変更後)
.DS_Store
*.swf
- 属性の設定値: svn:ignore (変更前)
as3/Syndication/trunk/tests/org/libspark/syndication/AllTests.as
r966 r985 1 /** 2 * ActionScript Syndication Library 3 * 4 * Copyright (c) 2008 Takanobu Izukawa (humming.via-kitchen.com) and 5 * Spark project (www.libspark.org) 6 * 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 */ 1 11 package org.libspark.syndication 2 12 { 3 13 import org.libspark.as3unit.runners.Suite; 14 import org.libspark.syndication.utils.UtilsAllTests; 4 15 5 16 /** … … 17 28 RSS2FeedTests, 18 29 RSS2FeedEntryTests, 30 31 UtilsAllTests, 19 32 ]; 20 33 } 21 34 } 35 as3/Syndication/trunk/tests/org/libspark/syndication/AtomFeedEntryTests.as
r952 r985 1 /** 2 * ActionScript Syndication Library 3 * 4 * Copyright (c) 2008 Takanobu Izukawa (humming.via-kitchen.com) and 5 * Spark project (www.libspark.org) 6 * 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 */ 1 11 package org.libspark.syndication 2 12 { … … 9 19 import org.libspark.as3unit.assert.*; 10 20 11 import org.libspark.syndication.IFeed;12 import org.libspark.syndication.IFeedEntry;13 import org.libspark.syndication.AtomFeed;14 import org.libspark.syndication.AtomFeedEntry;15 16 21 use namespace after; 17 22 use namespace before; … … 19 24 20 25 /** 21 * 26 * AtomFeedEntry のテストクラス 22 27 */ 23 28 public class AtomFeedEntryTests 24 29 { 25 30 /** 26 * check author.31 * 著者が正しく取得出来るか 27 32 */ 28 33 test function author():void … … 41 46 42 47 /** 43 * check title.48 * タイトルが正しく取得出来るか 44 49 */ 45 50 test function title():void … … 58 63 59 64 /** 60 * check link.65 * パーマリンクが正しく取得出来るか 61 66 */ 62 67 test function link():void … … 75 80 76 81 /** 77 * check description.82 * 詳細が正しく取得出来るか 78 83 */ 79 84 test function description():void … … 93 98 94 99 /** 95 * check published.100 * 公開日が正しく取得出来るか 96 101 */ 97 102 test function published():void … … 111 116 112 117 /** 113 * check categories.118 * カテゴリーが正しく取得出来るか 114 119 */ 115 120 test function categories():void … … 129 134 } 130 135 } 136 as3/Syndication/trunk/tests/org/libspark/syndication/AtomFeedTests.as
r952 r985 1 /** 2 * ActionScript Syndication Library 3 * 4 * Copyright (c) 2008 Takanobu Izukawa (humming.via-kitchen.com) and 5 * Spark project (www.libspark.org) 6 * 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 */ 1 11 package org.libspark.syndication 2 12 { … … 9 19 import org.libspark.as3unit.assert.*; 10 20 11 import org.libspark.syndication.IFeed;12 import org.libspark.syndication.AtomFeed;13 import org.libspark.syndication.AtomFeedEntry;14 15 21 use namespace after; 16 22 use namespace before; … … 18 24 19 25 /** 20 * AtomFeed 's test class.26 * AtomFeed のテストクラス 21 27 */ 22 28 public class AtomFeedTests 23 29 { 24 30 /** 25 * check title.31 * タイトルが正しく取得出来るか 26 32 */ 27 33 test function title():void … … 39 45 40 46 /** 41 * check link.47 * リンクが正しく取得出来るか 42 48 */ 43 49 test function link():void … … 55 61 56 62 /** 57 * check entries.63 * エントリーが正しく取得出来るか 58 64 */ 59 65 test function entries():void … … 75 81 } 76 82 } 83 as3/Syndication/trunk/tests/org/libspark/syndication/FeedTests.as
r966 r985 1 /** 2 * ActionScript Syndication Library 3 * 4 * Copyright (c) 2008 Takanobu Izukawa (humming.via-kitchen.com) and 5 * Spark project (www.libspark.org) 6 * 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 */ 1 11 package org.libspark.syndication 2 12 { 13 import flash.errors.IllegalOperationError; 3 14 import org.libspark.as3unit.after; 4 15 import org.libspark.as3unit.before; 5 16 import org.libspark.as3unit.test; 17 import org.libspark.as3unit.test_expected; 6 18 import org.libspark.as3unit.assert.*; 7 8 import org.libspark.syndication. Feed;19 20 import org.libspark.syndication.errors.UnknownFeedError; 9 21 10 22 use namespace after; 11 23 use namespace before; 12 24 use namespace test; 13 25 use namespace test_expected; 26 27 /** 28 * Feed のテストクラス 29 */ 14 30 public class FeedTests 15 31 { 16 test function title():void 32 /** 33 * nullを解析させた場合に IllegalOperationError がスローされるか 34 */ 35 test_expected static const parseNull:Class = IllegalOperationError; 36 test function parseNull():void 17 37 { 18 38 Feed.parse(null); 19 39 } 20 40 21 test function link():void 41 /** 42 * 定義されていないXMLを解析させた場合に UnknownFeedError がスローされるか 43 */ 44 test_expected static const parseInvalid:Class = UnknownFeedError; 45 test function parseInvalid():void 22 46 { 47 var invalid:XML = <spam><egg>Ni!</egg></spam>; 23 48 24 } 25 26 test function entries():void 27 { 28 29 } 30 31 test function parse():void 32 { 33 49 Feed.parse(invalid); 34 50 } 35 51 } 36 52 } 53 as3/Syndication/trunk/tests/org/libspark/syndication/RSS2FeedEntryTests.as
r952 r985 1 /** 2 * ActionScript Syndication Library 3 * 4 * Copyright (c) 2008 Takanobu Izukawa (humming.via-kitchen.com) and 5 * Spark project (www.libspark.org) 6 * 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 */ 1 11 package org.libspark.syndication 2 12 { … … 9 19 import org.libspark.as3unit.assert.*; 10 20 11 import org.libspark.syndication.IFeed;12 import org.libspark.syndication.IFeedEntry;13 import org.libspark.syndication.RSS2Feed;14 import org.libspark.syndication.RSS2FeedEntry;15 16 21 use namespace after; 17 22 use namespace before; … … 19 24 20 25 /** 21 * 26 * RSS2FeedEntry のテストクラス 22 27 */ 23 28 public class RSS2FeedEntryTests 24 29 { 25 public static const FeedClass:Class = RSS2Feed;26 public static const FeedEntryClass:Class = RSS2FeedEntry;27 28 30 /** 29 * check author. (not required)31 * 著者が正しく取得出来るか 30 32 */ 31 33 test function author():void … … 35 37 { 36 38 var result:XML = XML(evt.target.data); 37 var feed:IFeed = new FeedClass(result);39 var feed:IFeed = new RSS2Feed(result); 38 40 var entry:IFeedEntry = feed.entries[0]; 39 41 // not required element... 40 42 assertEquals(entry.author, ''); 41 43 … … 44 46 45 47 /** 46 * check title.48 * タイトルが正しく取得出来るか 47 49 */ 48 50 test function title():void … … 52 54 { 53 55 var result:XML = XML(evt.target.data); 54 var feed:IFeed = new FeedClass(result);56 var feed:IFeed = new RSS2Feed(result); 55 57 var entry:IFeedEntry = feed.entries[0]; 56 58 … … 61 63 62 64 /** 63 * check link.65 * パーマリンクが正しく取得出来るか 64 66 */ 65 67 test function link():void … … 69 71 { 70 72 var result:XML = XML(evt.target.data); 71 var feed:IFeed = new FeedClass(result);73 var feed:IFeed = new RSS2Feed(result); 72 74 var entry:IFeedEntry = feed.entries[0]; 73 75 … … 78 80 79 81 /** 80 * check description.82 * 詳細が正しく取得出来るか 81 83 */ 82 84 test function description():void … … 86 88 { 87 89 var result:XML = XML(evt.target.data); 88 var feed:IFeed = new FeedClass(result);90 var feed:IFeed = new RSS2Feed(result); 89 91 var entry:IFeedEntry = feed.entries[0]; 90 92 … … 96 98 97 99 /** 98 * check published.100 * 公開日が正しく取得出来るか 99 101 */ 100 102 test function published():void … … 104 106 { 105 107 var result:XML = XML(evt.target.data); 106 var feed:IFeed = new FeedClass(result);108 var feed:IFeed = new RSS2Feed(result); 107 109 var entry:IFeedEntry = feed.entries[0]; 108 110 var checked:Date = new Date('Sun Aug 10 21:13:41 GMT+0900 2008'); … … 114 116 115 117 /** 116 * check categories.118 * カテゴリーが正しく取得出来るか 117 119 */ 118 120 test function categories():void … … 122 124 { 123 125 var result:XML = XML(evt.target.data); 124 var feed:IFeed = new FeedClass(result);126 var feed:IFeed = new RSS2Feed(result); 125 127 var entry:IFeedEntry = feed.entries[0]; 126 128 … … 132 134 } 133 135 } 136 as3/Syndication/trunk/tests/org/libspark/syndication/RSS2FeedTests.as
r952 r985 1 /** 2 * ActionScript Syndication Library 3 * 4 * Copyright (c) 2008 Takanobu Izukawa (humming.via-kitchen.com) and 5 * Spark project (www.libspark.org) 6 * 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 */ 1 11 package org.libspark.syndication 2 12 { … … 9 19 import org.libspark.as3unit.assert.*; 10 20 11 import org.libspark.syndication.IFeed;12 import org.libspark.syndication.RSS2Feed;13 import org.libspark.syndication.RSS2FeedEntry;14 15 21 use namespace after; 16 22 use namespace before; … … 18 24 19 25 /** 20 * RSS2Feed 's test class.26 * RSS2Feed のテストクラス 21 27 */ 22 28 public class RSS2FeedTests 23 29 { 24 30 /** 25 * check title.31 * タイトルが正しく取得出来るか 26 32 */ 27 33 test function title():void … … 39 45 40 46 /** 41 * check link.47 * リンクが正しく取得出来るか 42 48 */ 43 49 test function link():void … … 55 61 56 62 /** 57 * check entries.63 * エントリーが正しく取得出来るか 58 64 */ 59 65 test function entries():void … … 75 81 } 76 82 } 83 as3/Syndication/trunk/tests/org/libspark/syndication/RSSFeedEntryTests.as
r966 r985 1 /** 2 * ActionScript Syndication Library 3 * 4 * Copyright (c) 2008 Takanobu Izukawa (humming.via-kitchen.com) and 5 * Spark project (www.libspark.org) 6 * 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 */ 1 11 package org.libspark.syndication 2 12 { … … 9 19 import org.libspark.as3unit.assert.*; 10 20 11 import org.libspark.syndication.IFeed;12 import org.libspark.syndication.IFeedEntry;13 import org.libspark.syndication.RSSFeed;14 import org.libspark.syndication.RSSFeedEntry;15 16 21 use namespace after; 17 22 use namespace before; … … 19 24 20 25 /** 21 * 26 * RSSFeedEntry のテストクラス 22 27 */ 23 28 public class RSSFeedEntryTests 24 29 { 25 30 /** 26 * check author.31 * 著者が正しく取得出来るか 27 32 */ 28 33 test function author():void … … 41 46 42 47 /** 43 * check title.48 * タイトルが正しく取得出来るか 44 49 */ 45 50 test function title():void … … 58 63 59 64 /** 60 * check link.65 * パーマリンクが正しく取得出来るか 61 66 */ 62 67 test function link():void … … 75 80 76 81 /** 77 * check description.82 * 詳細が正しく取得出来るか 78 83 */ 79 84 test function description():void … … 95 100 96 101 /** 97 * check published.102 * 公開日が正しく取得出来るか 98 103 */ 99 104 test function published():void … … 113 118 114 119 /** 115 * check categories.120 * カテゴリーが正しく取得出来るか 116 121 */ 117 122 test function categories():void … … 131 136 } 132 137 } 138 as3/Syndication/trunk/tests/org/libspark/syndication/RSSFeedTests.as
r952 r985 1 /** 2 * ActionScript Syndication Library 3 * 4 * Copyright (c) 2008 Takanobu Izukawa (humming.via-kitchen.com) and 5 * Spark project (www.libspark.org) 6 * 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 */ 1 11 package org.libspark.syndication 2 12 { … … 9 19 import org.libspark.as3unit.assert.*; 10 20 11 import org.libspark.syndication.IFeed;12 import org.libspark.syndication.RSSFeed;13 import org.libspark.syndication.RSSFeedEntry;14 15 21 use namespace after; 16 22 use namespace before; … … 18 24 19 25 /** 20 * RSSFeed 's test class.26 * RSSFeed のテストクラス 21 27 */ 22 28 public class RSSFeedTests 23 29 { 24 30 /** 25 * check title.31 * タイトルを正しく取得出来るか 26 32 */ 27 33 test function title():void … … 39 45 40 46 /** 41 * check link.47 * リンクを正しく取得出来るか 42 48 */ 43 49 test function link():void … … 55 61 56 62 /** 57 * check entries.63 * エントリーを正しく取得出来るか 58 64 */ 59 65 test function entries():void … … 75 81 } 76 82 } 83

