gstreamer-sharp: Add test checking AppSrc and AppSink constructors work properly
authorJakub Adam <jakub.adam@collabora.com>
Tue, 7 Jul 2020 13:21:24 +0000 (15:21 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 8 Mar 2022 12:01:13 +0000 (12:01 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1885>

subprojects/gstreamer-sharp/Tests/AppTests.cs [new file with mode: 0644]
subprojects/gstreamer-sharp/Tests/meson.build

diff --git a/subprojects/gstreamer-sharp/Tests/AppTests.cs b/subprojects/gstreamer-sharp/Tests/AppTests.cs
new file mode 100644 (file)
index 0000000..80fa221
--- /dev/null
@@ -0,0 +1,42 @@
+// Copyright (C) 2020 Jakub Adam <jakub.adam@collabora.com>
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+// 02110-1301  USA
+
+using NUnit.Framework;
+using System;
+using Gst;
+using Gst.App;
+
+namespace GstSharp.Tests
+{
+    [TestFixture]
+    public class AppTests : TestBase
+    {
+        [Test]
+        public void TestAppElementsConstructors()
+        {
+            Gst.Application.Init();
+
+            var appsink = new AppSink("appsink");
+            Assert.IsNotNull(appsink);
+
+            var appsrc = new AppSrc("appsrc");
+            Assert.IsNotNull(appsrc);
+        }
+
+    }
+}
+
index 59bf9d1..caae3f6 100644 (file)
@@ -37,7 +37,8 @@ if nunit_console.found()
     if nunit_dep.found()
         foreach test: [
                 # 'PipelineTests',
-                'SdpTests'
+                'SdpTests',
+                'AppTests'
                 ]
             lib = shared_library(test, test + '.cs', 'TestBase.cs',
                         cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114'],