Updated French translation
[profile/ivi/rygel.git] / tests / rygel-playbin-renderer-test.vala
1 /*
2  * Copyright (C) 2012 Openismus GmbH
3  *
4  * Author: Murray Cumming <murrayc@openismus.com>
5  *
6  * This file is part of Rygel.
7  *
8  * Rygel is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * Rygel is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  */
22
23 /**
24  * TODO: This currently just tests instantiation.
25  * We should also test how it works somehow.
26  */
27 private class Rygel.PlaybinRendererTest : GLib.Object {
28     public static int main (string[] args) {
29         Gst.init (ref args);
30
31         var test = new PlaybinRendererTest ();
32         test.test_with_default_gstplaybin ();
33         test.test_with_existing_gstplaybin ();
34
35         return 0;
36     }
37
38     public void test_with_default_gstplaybin() {
39         var renderer = new Rygel.Playbin.Renderer ("test playbin renderer");
40         assert (renderer != null);
41         var player = Rygel.Playbin.Player.get_default ();
42         assert (player.playbin != null);
43     }
44
45     public void test_with_existing_gstplaybin() {
46         var element = Gst.ElementFactory.make ("playbin", null);
47         var renderer = new Rygel.Playbin.Renderer.wrap (element, "test playbin renderer");
48         assert (renderer != null);
49         var player = Rygel.Playbin.Player.get_default ();
50         assert (player.playbin != null);
51     }
52 }