チェンジセット 985

差分発生行の前後
無視リスト:
コミット日時:
2008/08/20 02:25:42 (3 年前)
コミッタ:
nobu
ログメッセージ:

Syndication: refs #52 #53

  • コメントを追記。
  • テストを追加。
ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/Syndication/trunk

    • 属性の設定値: svn:ignore (変更前)

      (変更後)
      log.txt
      .DS_Store
  • as3/Syndication/trunk/samples

    • 属性の設定値: svn:ignore (登録)
      .DS_Store
  • as3/Syndication/trunk/src

    • 属性の設定値: svn:ignore (登録)
      .DS_Store
  • as3/Syndication/trunk/src/org/libspark/syndication/AtomFeed.as

    r963 r985  
    1616     
    1717    /** 
    18      *  AtomFeed. 
     18     *  IFeed インターフェイスの実装クラスで Atom に対応した実装を提供します。 
    1919     */ 
    2020    public class AtomFeed implements IFeed 
    2121    { 
    2222        /** 
    23          *  a reference of raw data. 
     23         *  フィードのデータを保持します。 
    2424         */ 
    2525        private var _data:XML; 
     
    4242 
    4343        /** 
    44          *  a reference of entries. 
     44         *  エントリーの情報を保持します。 
    4545         */ 
    4646        private var _entries:Array; 
     
    6363         
    6464        /** 
    65          *  Constructor. 
     65         *  新しい AtomFeed クラスのインスタンスを作成します。 
     66         * 
     67         *  @param data             atom フィードの XML 
    6668         */ 
    6769        public function AtomFeed(data:XML) 
     
    7981    } 
    8082} 
     83 
  • as3/Syndication/trunk/src/org/libspark/syndication/AtomFeedEntry.as

    r963 r985  
    1717 
    1818    /** 
    19      *  AtomFeedEntry. 
     19     *  IFeedEntry インターフェイスの実装クラスで Atom に対応した実装を提供します。 
    2020     */ 
    2121    public class AtomFeedEntry implements IFeedEntry 
    2222    { 
    2323        /** 
    24          *  a reference of raw data. 
     24         *  エントリーのデータを保持します。 
    2525         */ 
    2626        private var _data:XML; 
     
    5959 
    6060        /** 
    61          *  a reference of parsed published. 
     61         *  公開日の情報を保持します。 
    6262         */ 
    6363        private var _published:Date; 
     
    7676         
    7777        /** 
    78          *  a reference of categories. 
     78         *  カテゴリーの情報を保持します。 
    7979         */ 
    8080        private var _categories:Array; 
     
    9797         
    9898        /** 
    99          *  Constructor. 
     99         *  新しい AtomFeedEntry クラスのインスタンスを作成します。 
     100         * 
     101         *  @param data             Atom エントリーの XML 
    100102         */ 
    101103        public function AtomFeedEntry(data:XML) 
     
    113115    } 
    114116} 
     117 
  • as3/Syndication/trunk/src/org/libspark/syndication/Feed.as

    r963 r985  
    1111package org.libspark.syndication 
    1212{ 
     13    import flash.errors.IllegalOperationError; 
    1314    import flash.utils.getQualifiedClassName; 
     15    import org.libspark.syndication.errors.UnknownFeedError; 
    1416    import org.libspark.syndication.namespaces.rss; 
    1517    import org.libspark.syndication.namespaces.atom; 
     
    6668         
    6769        /** 
     70         *  フィードをパースする 
    6871         * 
     72         *  @param data             Feedの文字列かXML 
     73         *  @return                 Feedオブジェクト 
     74         *  @throws 
     75         *      IllegalOperationError 
     76         *      UnknownFeedError 
    6977         */ 
    70         public static function parse(dataString:String):Feed 
     78        public static function parse(data:*):Feed 
    7179        { 
    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 
    7392            var localName:String = data.localName(); 
    7493            var version:String = data.@version.toString(); 
    7594            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(); }); 
    7796             
    7897            var adapter:IFeed; 
     
    91110            else 
    92111            { 
    93                 throw new ArgumentError("invalid argument. "+dataString); 
     112                           throw new UnknownFeedError("Unable to determine feed type."); 
    94113            } 
    95114            return new Feed(adapter); 
     
    97116    } 
    98117} 
     118 
  • as3/Syndication/trunk/src/org/libspark/syndication/IFeed.as

    r963 r985  
    1212{ 
    1313    /** 
    14      *  feed object interface. 
     14     *  フィードクラスのメソッドを提供します。 
    1515     */ 
    1616    public interface IFeed 
    1717    { 
    1818        /** 
    19          *  get title attribute. 
     19         *  フィードのタイトルを取得します。 
    2020         */ 
    2121        function get title():String; 
    2222 
    2323        /** 
    24          *  get link attribute. 
     24         *  フィードのリンクを取得します。 
    2525         */ 
    2626        function get link():String; 
    2727         
    2828        /** 
    29          *  get entries. 
     29         *  フィードのエントリーを取得します。 
    3030         */ 
    3131        function get entries():Array; 
    3232         
    3333        /** 
    34          *  representation the object string format. 
     34         *  フィードクラスの文字列表現を取得します。 
    3535         */ 
    3636        function toString():String; 
    3737    } 
    3838} 
     39 
  • as3/Syndication/trunk/src/org/libspark/syndication/IFeedEntry.as

    r963 r985  
    1212{ 
    1313    /** 
    14      *  feed entry interface. 
     14     *  フィードエントリークラスのメソッドを提供します。 
    1515     */ 
    1616    public interface IFeedEntry 
    1717    { 
    1818        /** 
    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         *  エントリーの著者を取得します。 
    2720         */ 
    2821        function get author():String; 
    2922 
    3023        /** 
    31          *  get title. 
    32          * 
    33          *  RSS 1.0 
    34          *      - title 
    35          *  RSS 2.0 
    36          *      - title 
    37          *  ATOM 
    38          *      - title 
     24         *  エントリーのタイトルを取得します。 
    3925         */ 
    4026        function get title():String; 
    4127 
    4228        /** 
    43          *  get permalink url. 
    44          * 
    45          *  RSS 1.0 
    46          *      - link 
    47          *  RSS 2.0 
    48          *      - link 
    49          *  ATOM 
    50          *      - link@href 
     29         *  エントリーのパーマリンクを取得します。 
    5130         */ 
    5231        function get link():String; 
    5332 
    5433        /** 
    55          *  get description. 
    56          * 
    57          *  RSS 1.0 
    58          *      - content::encoded 
    59          *  RSS 2.0 
    60          *      - description 
    61          *  ATOM 
    62          *      - content 
     34         *  エントリーの詳細を取得します。 
    6335         */ 
    6436        function get description():String; 
    6537 
    6638        /** 
    67          *  get published date. 
    68          * 
    69          *  RSS 1.0 
    70          *      - dc::date 
    71          *  RSS 2.0 
    72          *      - pubDate 
    73          *  ATOM 
    74          *      - published 
     39         *  エントリーの公開日を取得します。 
    7540         */ 
    7641        function get published():Date; 
    7742 
    7843        /** 
    79          *  get categories. 
    80          * 
    81          *  RSS 1.0 
    82          *      - dc:subject 
    83          *  RSS 2.0 
    84          *      - category 
    85          *  ATOM 
    86          *      - category@term 
     44         *  エントリーのカテゴリーを取得します。 
    8745         */ 
    8846        function get categories():Array; 
    8947 
    9048        /** 
    91          *  representation the object string format. 
     49         *  エントリークラスの文字列表現を取得します。 
    9250         */ 
    9351        function toString():String; 
    9452    } 
    9553} 
     54 
  • as3/Syndication/trunk/src/org/libspark/syndication/RSS2Feed.as

    r963 r985  
    1818     
    1919    /** 
    20      *  RSS2Feed. 
     20     *  IFeed インターフェイスの実装クラスで RSS 2.0 に対応した実装を提供します。 
    2121     */ 
    2222    public class RSS2Feed implements IFeed 
    2323    { 
    2424        /** 
    25          *  a reference of raw data. 
     25         *  フィードのデータを保持します。 
    2626         */ 
    2727        private var _data:XML; 
     
    4444         
    4545        /** 
    46          *  a reference of entries. 
     46         *  エントリーの情報を保持します。 
    4747         */ 
    4848        private var _entries:Array; 
     
    6565 
    6666        /** 
    67          *  Constructor. 
     67         *  新しい RSS2Feed クラスのインスタンスを作成します。 
     68         * 
     69         *  @param data         rss 2.0 フィードの XML 
    6870         */ 
    6971        public function RSS2Feed(data:XML) 
     
    8183    } 
    8284} 
     85 
  • as3/Syndication/trunk/src/org/libspark/syndication/RSS2FeedEntry.as

    r963 r985  
    1919 
    2020    /** 
    21      *  RSS2FeedEntry. 
     21     *  IFeedEntry インターフェイスの実装クラスで RSS 2.0 に対応した実装を提供します。 
    2222     */ 
    2323    public class RSS2FeedEntry implements IFeedEntry 
    2424    { 
    2525        /** 
    26          *  a reference of raw data. 
     26         *  エントリーのデータを保持します。 
    2727         */ 
    2828        private var _data:XML; 
     
    6161 
    6262        /** 
    63          *  a reference of published. 
     63         *  公開日の情報を保持します。 
    6464         */ 
    6565        private var _published:Date; 
     
    7878         
    7979        /** 
    80          *  a reference of categories. 
     80         *  カテゴリーの情報を保持します。 
    8181         */ 
    8282        private var _categories:Array; 
     
    9999 
    100100        /** 
    101          *  Constructor. 
     101         *  新しい RSS2FeedEntry クラスのインスタンスを作成します。 
     102         * 
     103         *  @param data             RSS 2.0 エントリーの XML 
    102104         */ 
    103105        public function RSS2FeedEntry(data:XML) 
     
    115117    } 
    116118} 
     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 */ 
    111package org.libspark.syndication 
    212{ 
     
    1222 
    1323    /** 
    14      *  RSSFeed. 
     24     *  IFeed インターフェイスの実装クラスで RSS 1.0 に対応した実装を提供します。 
    1525     */ 
    1626    public class RSSFeed implements IFeed 
    1727    { 
    1828        /** 
    19          *  a reference of raw data. 
     29         *  フィードのデータを保持します。 
    2030         */ 
    2131        private var _data:XML; 
     
    3848 
    3949        /** 
    40          *  a reference of entries. 
     50         *  エントリーの情報を保持します。 
    4151         */ 
    4252        private var _entries:Array; 
    4353         
    4454        /** 
    45          * 
     55         *  @inheritDoc 
    4656         */ 
    4757        public function get entries():Array 
     
    5969 
    6070        /** 
    61          *  Constructor. 
     71         *  新しい RSSFeed クラスのインスタンスを作成します。 
    6272         */ 
    6373        public function RSSFeed(data:XML) 
     
    7585    } 
    7686} 
     87 
  • as3/Syndication/trunk/src/org/libspark/syndication/RSSFeedEntry.as

    r963 r985  
    2323 
    2424    /** 
    25      *  RSSFeedEntry. 
     25     *  IFeedEntry インターフェイスの実装クラスで RSS 1.0 に対応した実装を提供します。 
    2626     */ 
    2727    public class RSSFeedEntry implements IFeedEntry 
    2828    { 
    2929        /** 
    30          *  a reference of raw data. 
     30         *  エントリーのデータを保持します。 
    3131         */ 
    3232        private var _data:XML; 
     
    6565 
    6666        /** 
    67          *  a reference of published. 
     67         *  公開日の情報を保持します。 
    6868         */ 
    6969        private var _published:Date; 
     
    8282         
    8383        /** 
    84          *  a reference of categories. 
     84         *  カテゴリーの情報を保持します。 
    8585         */ 
    8686        private var _categories:Array; 
     
    103103 
    104104        /** 
    105          *  Constructor. 
     105         *  新しい RSSFeedEntry クラスのインスタンスを作成します。 
     106         * 
     107         *  @param data             RSS 1.0 エントリーの XML 
    106108         */ 
    107109        public function RSSFeedEntry(data:XML) 
     
    119121    } 
    120122} 
     123 
  • as3/Syndication/trunk/src/org/libspark/syndication/namespaces

    • 属性の設定値: svn:ignore (登録)
      .DS_Store
  • as3/Syndication/trunk/src/org/libspark/syndication/namespaces/atom.as

    r963 r985  
    1313    public namespace atom = "http://www.w3.org/2005/Atom"; 
    1414} 
     15 
  • as3/Syndication/trunk/src/org/libspark/syndication/namespaces/content.as

    r963 r985  
    1313    public namespace content = "http://purl.org/rss/1.0/modules/content/"; 
    1414} 
     15 
  • as3/Syndication/trunk/src/org/libspark/syndication/namespaces/dc.as

    r963 r985  
    1313    public namespace dc = "http://purl.org/dc/elements/1.1/"; 
    1414} 
     15 
  • as3/Syndication/trunk/src/org/libspark/syndication/namespaces/rdf.as

    r963 r985  
    1313    public namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
    1414} 
     15 
  • as3/Syndication/trunk/src/org/libspark/syndication/namespaces/rss.as

    r963 r985  
    1313    public namespace rss = "http://purl.org/rss/1.0/"; 
    1414} 
     15 
  • as3/Syndication/trunk/src/org/libspark/syndication/utils/DateUtil.as

    r963 r985  
    1212{ 
    1313    /** 
    14      *  DateUtil. 
     14     *  日付関連のユーティリティメソッドを提供します。 
    1515     */ 
    1616    public class DateUtil 
     
    2626         */ 
    2727        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' 
    3035        ]; 
    3136 
     
    157162    } 
    158163} 
     164 
  • as3/Syndication/trunk/tests

    • 属性の設定値: svn:ignore (変更前)
      log.txt
      .DS_Store
      *.swf
      (変更後)
      .DS_Store
      *.swf
  • 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 */ 
    111package org.libspark.syndication 
    212{ 
    313    import org.libspark.as3unit.runners.Suite; 
     14    import org.libspark.syndication.utils.UtilsAllTests; 
    415 
    516    /** 
     
    1728            RSS2FeedTests, 
    1829            RSS2FeedEntryTests, 
     30 
     31            UtilsAllTests, 
    1932        ]; 
    2033    } 
    2134} 
     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 */ 
    111package org.libspark.syndication 
    212{ 
     
    919    import org.libspark.as3unit.assert.*; 
    1020 
    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  
    1621    use namespace after; 
    1722    use namespace before; 
     
    1924 
    2025    /** 
    21      * 
     26     *  AtomFeedEntry のテストクラス 
    2227     */ 
    2328    public class AtomFeedEntryTests 
    2429    { 
    2530        /** 
    26          *  check author. 
     31         *  著者が正しく取得出来るか 
    2732         */ 
    2833        test function author():void 
     
    4146 
    4247        /** 
    43          *  check title. 
     48         *  タイトルが正しく取得出来るか 
    4449         */ 
    4550        test function title():void 
     
    5863 
    5964        /** 
    60          *  check link. 
     65         *  パーマリンクが正しく取得出来るか 
    6166         */ 
    6267        test function link():void 
     
    7580 
    7681        /** 
    77          *  check description. 
     82         *  詳細が正しく取得出来るか 
    7883         */ 
    7984        test function description():void 
     
    9398         
    9499        /** 
    95          *  check published. 
     100         *  公開日が正しく取得出来るか 
    96101         */ 
    97102        test function published():void 
     
    111116 
    112117        /** 
    113          *  check categories. 
     118         *  カテゴリーが正しく取得出来るか 
    114119         */ 
    115120        test function categories():void 
     
    129134    } 
    130135} 
     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 */ 
    111package org.libspark.syndication 
    212{ 
     
    919    import org.libspark.as3unit.assert.*; 
    1020 
    11     import org.libspark.syndication.IFeed; 
    12     import org.libspark.syndication.AtomFeed; 
    13     import org.libspark.syndication.AtomFeedEntry; 
    14  
    1521    use namespace after; 
    1622    use namespace before; 
     
    1824 
    1925    /** 
    20      *  AtomFeed's test class. 
     26     *  AtomFeed のテストクラス 
    2127     */ 
    2228    public class AtomFeedTests 
    2329    { 
    2430        /** 
    25          *  check title. 
     31         *  タイトルが正しく取得出来るか 
    2632         */ 
    2733        test function title():void 
     
    3945 
    4046        /** 
    41          *  check link. 
     47         *  リンクが正しく取得出来るか 
    4248         */ 
    4349        test function link():void 
     
    5561 
    5662        /** 
    57          *  check entries. 
     63         *  エントリーが正しく取得出来るか 
    5864         */ 
    5965        test function entries():void 
     
    7581    } 
    7682} 
     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 */ 
    111package org.libspark.syndication 
    212{ 
     13    import flash.errors.IllegalOperationError; 
    314    import org.libspark.as3unit.after; 
    415    import org.libspark.as3unit.before; 
    516    import org.libspark.as3unit.test; 
     17    import org.libspark.as3unit.test_expected; 
    618    import org.libspark.as3unit.assert.*; 
    7      
    8     import org.libspark.syndication.Feed
     19 
     20    import org.libspark.syndication.errors.UnknownFeedError
    921 
    1022    use namespace after; 
    1123    use namespace before; 
    1224    use namespace test; 
    13      
     25    use namespace test_expected; 
     26 
     27    /** 
     28     *  Feed のテストクラス 
     29     */ 
    1430    public class FeedTests 
    1531    { 
    16         test function title():void 
     32        /** 
     33         *  nullを解析させた場合に IllegalOperationError がスローされるか 
     34         */ 
     35        test_expected static const parseNull:Class = IllegalOperationError; 
     36        test function parseNull():void 
    1737        { 
    18              
     38            Feed.parse(null); 
    1939        } 
    2040 
    21         test function link():void 
     41        /** 
     42         *  定義されていないXMLを解析させた場合に UnknownFeedError がスローされるか 
     43         */ 
     44        test_expected static const parseInvalid:Class = UnknownFeedError; 
     45        test function parseInvalid():void 
    2246        { 
     47            var invalid:XML = <spam><egg>Ni!</egg></spam>; 
    2348 
    24         } 
    25  
    26         test function entries():void 
    27         { 
    28              
    29         } 
    30  
    31         test function parse():void 
    32         { 
    33              
     49            Feed.parse(invalid); 
    3450        } 
    3551    } 
    3652} 
     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 */ 
    111package org.libspark.syndication 
    212{ 
     
    919    import org.libspark.as3unit.assert.*; 
    1020 
    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  
    1621    use namespace after; 
    1722    use namespace before; 
     
    1924 
    2025    /** 
    21      * 
     26     *  RSS2FeedEntry のテストクラス 
    2227     */ 
    2328    public class RSS2FeedEntryTests 
    2429    { 
    25         public static const FeedClass:Class = RSS2Feed; 
    26         public static const FeedEntryClass:Class = RSS2FeedEntry; 
    27  
    2830        /** 
    29          *  check author. (not required) 
     31         *  著者が正しく取得出来るか 
    3032         */ 
    3133        test function author():void 
     
    3537            { 
    3638                var result:XML = XML(evt.target.data); 
    37                 var feed:IFeed = new FeedClass(result); 
     39                var feed:IFeed = new RSS2Feed(result); 
    3840                var entry:IFeedEntry = feed.entries[0]; 
    39  
     41                //  not required element... 
    4042                assertEquals(entry.author, ''); 
    4143 
     
    4446 
    4547        /** 
    46          *  check title. 
     48         *  タイトルが正しく取得出来るか 
    4749         */ 
    4850        test function title():void 
     
    5254            { 
    5355                var result:XML = XML(evt.target.data); 
    54                 var feed:IFeed = new FeedClass(result); 
     56                var feed:IFeed = new RSS2Feed(result); 
    5557                var entry:IFeedEntry = feed.entries[0]; 
    5658 
     
    6163 
    6264        /** 
    63          *  check link. 
     65         *  パーマリンクが正しく取得出来るか 
    6466         */ 
    6567        test function link():void 
     
    6971            { 
    7072                var result:XML = XML(evt.target.data); 
    71                 var feed:IFeed = new FeedClass(result); 
     73                var feed:IFeed = new RSS2Feed(result); 
    7274                var entry:IFeedEntry = feed.entries[0]; 
    7375 
     
    7880 
    7981        /** 
    80          *  check description. 
     82         *  詳細が正しく取得出来るか 
    8183         */ 
    8284        test function description():void 
     
    8688            { 
    8789                var result:XML = XML(evt.target.data); 
    88                 var feed:IFeed = new FeedClass(result); 
     90                var feed:IFeed = new RSS2Feed(result); 
    8991                var entry:IFeedEntry = feed.entries[0]; 
    9092 
     
    9698         
    9799        /** 
    98          *  check published. 
     100         *  公開日が正しく取得出来るか 
    99101         */ 
    100102        test function published():void 
     
    104106            { 
    105107                var result:XML = XML(evt.target.data); 
    106                 var feed:IFeed = new FeedClass(result); 
     108                var feed:IFeed = new RSS2Feed(result); 
    107109                var entry:IFeedEntry = feed.entries[0]; 
    108110                var checked:Date = new Date('Sun Aug 10 21:13:41 GMT+0900 2008'); 
     
    114116 
    115117        /** 
    116          *  check categories. 
     118         *  カテゴリーが正しく取得出来るか 
    117119         */ 
    118120        test function categories():void 
     
    122124            { 
    123125                var result:XML = XML(evt.target.data); 
    124                 var feed:IFeed = new FeedClass(result); 
     126                var feed:IFeed = new RSS2Feed(result); 
    125127                var entry:IFeedEntry = feed.entries[0]; 
    126128 
     
    132134    } 
    133135} 
     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 */ 
    111package org.libspark.syndication 
    212{ 
     
    919    import org.libspark.as3unit.assert.*; 
    1020 
    11     import org.libspark.syndication.IFeed; 
    12     import org.libspark.syndication.RSS2Feed; 
    13     import org.libspark.syndication.RSS2FeedEntry; 
    14  
    1521    use namespace after; 
    1622    use namespace before; 
     
    1824 
    1925    /** 
    20      *  RSS2Feed's test class. 
     26     *  RSS2Feed のテストクラス 
    2127     */ 
    2228    public class RSS2FeedTests 
    2329    { 
    2430        /** 
    25          *  check title. 
     31         *  タイトルが正しく取得出来るか 
    2632         */ 
    2733        test function title():void 
     
    3945 
    4046        /** 
    41          *  check link. 
     47         *  リンクが正しく取得出来るか 
    4248         */ 
    4349        test function link():void 
     
    5561 
    5662        /** 
    57          *  check entries. 
     63         *  エントリーが正しく取得出来るか 
    5864         */ 
    5965        test function entries():void 
     
    7581    } 
    7682} 
     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 */ 
    111package org.libspark.syndication 
    212{ 
     
    919    import org.libspark.as3unit.assert.*; 
    1020 
    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  
    1621    use namespace after; 
    1722    use namespace before; 
     
    1924 
    2025    /** 
    21      * 
     26     *  RSSFeedEntry のテストクラス 
    2227     */ 
    2328    public class RSSFeedEntryTests 
    2429    { 
    2530        /** 
    26          *  check author. 
     31         *  著者が正しく取得出来るか 
    2732         */ 
    2833        test function author():void 
     
    4146 
    4247        /** 
    43          *  check title. 
     48         *  タイトルが正しく取得出来るか 
    4449         */ 
    4550        test function title():void 
     
    5863 
    5964        /** 
    60          *  check link. 
     65         *  パーマリンクが正しく取得出来るか 
    6166         */ 
    6267        test function link():void 
     
    7580 
    7681        /** 
    77          *  check description. 
     82         *  詳細が正しく取得出来るか 
    7883         */ 
    7984        test function description():void 
     
    95100         
    96101        /** 
    97          *  check published. 
     102         *  公開日が正しく取得出来るか 
    98103         */ 
    99104        test function published():void 
     
    113118 
    114119        /** 
    115          *  check categories. 
     120         *  カテゴリーが正しく取得出来るか 
    116121         */ 
    117122        test function categories():void 
     
    131136    } 
    132137} 
     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 */ 
    111package org.libspark.syndication 
    212{ 
     
    919    import org.libspark.as3unit.assert.*; 
    1020 
    11     import org.libspark.syndication.IFeed; 
    12     import org.libspark.syndication.RSSFeed; 
    13     import org.libspark.syndication.RSSFeedEntry; 
    14  
    1521    use namespace after; 
    1622    use namespace before; 
     
    1824 
    1925    /** 
    20      *  RSSFeed's test class. 
     26     *  RSSFeed のテストクラス 
    2127     */ 
    2228    public class RSSFeedTests 
    2329    { 
    2430        /** 
    25          *  check title. 
     31         *  タイトルを正しく取得出来るか 
    2632         */ 
    2733        test function title():void 
     
    3945 
    4046        /** 
    41          *  check link. 
     47         *  リンクを正しく取得出来るか 
    4248         */ 
    4349        test function link():void 
     
    5561 
    5662        /** 
    57          *  check entries. 
     63         *  エントリーを正しく取得出来るか 
    5864         */ 
    5965        test function entries():void 
     
    7581    } 
    7682} 
     83