チェンジセット 985: as3/Syndication/trunk/tests

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

Syndication: refs #52 #53

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

凡例:

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

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

      (変更後)
      log.txt
      .DS_Store
  • 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