[rygel] tests: Coverage for new subtitle APIs



commit 28578c2e2431b6e9336bfeb1cadd93920ecd2266
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Apr 13 14:25:54 2010 +0300

    tests: Coverage for new subtitle APIs

 tests/rygel-http-byte-seek-test.vala |    5 +++++
 tests/rygel-http-item-uri-test.vala  |   12 ++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/tests/rygel-http-byte-seek-test.vala b/tests/rygel-http-byte-seek-test.vala
index bdc2fc9..14e9b7e 100644
--- a/tests/rygel-http-byte-seek-test.vala
+++ b/tests/rygel-http-byte-seek-test.vala
@@ -35,12 +35,17 @@ private class Rygel.Thumbnail : GLib.Object {
     public int64 size = 1024;
 }
 
+private class Rygel.Subtitle : GLib.Object {
+    public int64 size = 1024;
+}
+
 private class Rygel.HTTPGet : GLib.Object {
     public const string ITEM_URI = "http://DoesntMatterWhatThisIs";;
 
     public Soup.Message msg;
     public MediaItem item;
     public Thumbnail thumbnail;
+    public Subtitle subtitle;
 
     public HTTPIdentityHandler handler;
 
diff --git a/tests/rygel-http-item-uri-test.vala b/tests/rygel-http-item-uri-test.vala
index 64708ae..8f3442d 100644
--- a/tests/rygel-http-item-uri-test.vala
+++ b/tests/rygel-http-item-uri-test.vala
@@ -56,6 +56,7 @@ private class Rygel.HTTPServer : GLib.Object {
 private class Rygel.HTTPItemURITest : GLib.Object {
     private const string ITEM_ID = "HELLO";
     private const int THUMBNAIL_INDEX = 1;
+    private const int SUBTITLE_INDEX = 1;
     private const string TRANSCODE_TARGET = "MP3";
 
     private HTTPServer server;
@@ -80,6 +81,7 @@ private class Rygel.HTTPItemURITest : GLib.Object {
         var uris = new HTTPItemURI[] {
             this.test_construction (),
             this.test_construction_with_thumbnail (),
+            this.test_construction_with_subtitle (),
             this.test_construction_with_transcoder () };
 
         foreach (var uri in uris) {
@@ -99,6 +101,15 @@ private class Rygel.HTTPItemURITest : GLib.Object {
         return uri;
     }
 
+    private HTTPItemURI test_construction_with_subtitle () {
+        var uri = new HTTPItemURI (ITEM_ID,
+                                   this.server,
+                                   SUBTITLE_INDEX);
+        assert (uri != null);
+
+        return uri;
+    }
+
     private HTTPItemURI test_construction_with_thumbnail () {
         var uri = new HTTPItemURI (ITEM_ID,
                                    this.server,
@@ -112,6 +123,7 @@ private class Rygel.HTTPItemURITest : GLib.Object {
         var uri = new HTTPItemURI (ITEM_ID,
                                    this.server,
                                    THUMBNAIL_INDEX,
+                                   -1,
                                    TRANSCODE_TARGET);
         assert (uri != null);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]