From 1f3ca43c5151a4f6bbd3dc230dda9ea6bca0acd3 Mon Sep 17 00:00:00 2001 From: Jakub Adam Date: Tue, 7 Jul 2020 15:21:24 +0200 Subject: [PATCH] gstreamer-sharp: Add test checking AppSrc and AppSink constructors work properly Part-of: --- subprojects/gstreamer-sharp/Tests/AppTests.cs | 42 +++++++++++++++++++ subprojects/gstreamer-sharp/Tests/meson.build | 3 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 subprojects/gstreamer-sharp/Tests/AppTests.cs diff --git a/subprojects/gstreamer-sharp/Tests/AppTests.cs b/subprojects/gstreamer-sharp/Tests/AppTests.cs new file mode 100644 index 0000000000..80fa221b98 --- /dev/null +++ b/subprojects/gstreamer-sharp/Tests/AppTests.cs @@ -0,0 +1,42 @@ +// Copyright (C) 2020 Jakub Adam +// +// 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); + } + + } +} + diff --git a/subprojects/gstreamer-sharp/Tests/meson.build b/subprojects/gstreamer-sharp/Tests/meson.build index 59bf9d182b..caae3f6c55 100644 --- a/subprojects/gstreamer-sharp/Tests/meson.build +++ b/subprojects/gstreamer-sharp/Tests/meson.build @@ -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'],