diff options
author | Jens Georg <jensg@openismus.com> | 2013-08-20 21:07:08 +0200 |
---|---|---|
committer | Jens Georg <jensg@openismus.com> | 2013-08-20 21:07:08 +0200 |
commit | a753a7c89fb6a24a68636124f7fe934ec599e1d7 (patch) | |
tree | d712210d14ea0d4f1aaa4e3be479740bf81a0aa2 /tests | |
parent | d0cc26858eedc6d3f108ef74539e814f7118a23d (diff) | |
download | rygel-a753a7c89fb6a24a68636124f7fe934ec599e1d7.tar.gz |
test: Adapt ObjectCreator test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 3 | ||||
l--------- | tests/rygel-media-engine.vala | 1 | ||||
-rw-r--r-- | tests/rygel-object-creator-test.vala | 44 |
3 files changed, 21 insertions, 27 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 217b67fa..ab69dfa8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -142,8 +142,9 @@ rygel_object_creator_test_SOURCES = rygel-object-creator-test.vala \ rygel-http-seek_object-creator.vala \ rygel-state-machine_object-creator.vala \ rygel-relational-expression.vala \ + rygel-logical-expression.vala \ rygel-search-expression.vala \ - rygel-media-engine.vala \ + rygel-search-criteria-parser.vala \ rygel-serializer_object-creator.vala \ rygel-m3u-playlist_object-creator.vala rygel_object_creator_test_VALAFLAGS = \ diff --git a/tests/rygel-media-engine.vala b/tests/rygel-media-engine.vala deleted file mode 120000 index 8d6c01fe..00000000 --- a/tests/rygel-media-engine.vala +++ /dev/null @@ -1 +0,0 @@ -../src/librygel-server/rygel-media-engine.vala
\ No newline at end of file diff --git a/tests/rygel-object-creator-test.vala b/tests/rygel-object-creator-test.vala index 95bd5e4f..80b83958 100644 --- a/tests/rygel-object-creator-test.vala +++ b/tests/rygel-object-creator-test.vala @@ -108,6 +108,11 @@ public class Rygel.ObjectRemovalQueue : GLib.Object { } } +public class Rygel.MediaServerPlugin : GLib.Object { + public GLib.List<DLNAProfile> upload_profiles = new GLib.List<DLNAProfile> + (); +} + public class Rygel.MediaObject : GLib.Object { public string id {get; set; } public string ref_id; @@ -210,10 +215,23 @@ public class Rygel.PlaylistItem : Rygel.MediaItem { } } +public class Rygel.RootDevice : GLib.Object { + public MediaServerPlugin resource_factory; + + public RootDevice () { + this.resource_factory = new MediaServerPlugin (); + } +} + public class Rygel.ContentDirectory : GLib.Object { public Cancellable cancellable; public MediaContainer root_container; public HTTPServer http_server; + public RootDevice root_device; + + public ContentDirectory () { + this.root_device = new RootDevice (); + } } public class Rygel.MediaContainer : Rygel.MediaObject { @@ -292,30 +310,6 @@ public errordomain Rygel.ContentDirectoryError { public class Rygel.Transcoder { } -public class Rygel.TestMediaEngine : Rygel.MediaEngine { - private GLib.List<DLNAProfile> dlna_profiles = new GLib.List<DLNAProfile>(); - - public override unowned GLib.List<DLNAProfile> get_dlna_profiles () { - return dlna_profiles; - } - - public override unowned GLib.List<Transcoder>? get_transcoders () { - return null; - } - - public override DataSource? create_data_source (string uri) { - return null; - } -} - -public class Rygel.EngineLoader { - public EngineLoader () { } - - public MediaEngine load_engine () { - return new TestMediaEngine (); - } -} - public static void log_func (string? domain, LogLevelFlags flags, string message) { @@ -375,7 +369,7 @@ public class Rygel.HTTPObjectCreatorTest : GLib.Object { var action = new ServiceAction (null, ""); var creator = new ObjectCreator (content_directory, action); creator.run.begin (); - assert (action.error_code == no_such_object.code); + assert (action.error_code == invalid_args.code); // check elements containing a comment action = new ServiceAction ("0", "<!-- This is an XML comment -->"); |