gstreamer/tests/BinTest.cs
Aaron Bockover 88b3b2c712 2006-05-20 Aaron Bockover <aaron@abock.org>
* autogen.sh: Fixed a left over configure.in to configure.ac

    * confiugre.ac: Added check foo for NUnit

    * gstreamer-sharp.mdp:
    * gstreamer-sharp.mds: Added MonoDevelop solution

    * source/Makefile.am: Cleaned and fixed

    * tests/ConsoleUi.cs:
    * tests/ApplicationTest.cs:
    * tests/BinTest.cs:
    * tests/Makefile.am: Added NUnit test framework and a few tests for
    Gst.Application and Gst.Bin

    * gstreamer-sharp/CommonTags.cs:
    * gstreamer-sharp/*.custom:
    * gstreamer-sharp/glue/*.c: Cleaned up

    * gstreamer-sharp/Application.cs: New application bindings; fixed
    to work properly with GStreamer 0.10

    * gstreamer-sharp/Version.cs: New Gst.Version class

    * gstreamer-sharp/Makefile.am: Added Version.cs

    * gstreamer-sharp/plugins-base/PlayBin.cs: Fixed and extended PlayBin
    element binding with new (but not all) properties

    * Makefile.am: Added tests



git-svn-id: svn://anonsvn.mono-project.com/source/branches/abock/gstreamer-sharp@60902 e3ebcda4-bce8-0310-ba0a-eca2169e7518
2006-05-20 22:35:40 +00:00

61 lines
1.2 KiB
C#

//
// BinTest.cs: NUnit Test Suite for gstreamer-sharp
//
// Authors:
// Aaron Bockover (abockover@novell.com)
//
// (C) 2006 Novell, Inc.
//
using System;
using NUnit.Framework;
using Gst;
[TestFixture]
public class BinTest
{
[TestFixtureSetUp]
public void Init()
{
Application.Init();
}
[TestFixtureTearDown]
public void Deinit()
{
Application.Deinit();
}
[Test]
public void TestAddMany()
{
Bin bin = new Bin("test-bin");
Element e1 = ElementFactory.Make("fakesrc", "fakesrc");
Element e2 = ElementFactory.Make("fakesink", "fakesink");
bin.AddMany(e1, e2);
Assert.AreEqual(bin.List.Length, 2);
e1.Dispose();
e2.Dispose();
bin.Dispose();
}
[Test]
public void TestGetByName()
{
Bin bin = new Bin("test-bin");
Element e1 = ElementFactory.Make("fakesrc", "element-name");
bin.Add(e1);
e1 = bin.GetByName("element-name");
Assert.IsNotNull(e1);
Assert.AreEqual(e1.Name, "element-name");
e1.Dispose();
bin.Dispose();
}
}