FFMpegCore/FFMpegCore.Test/FFMpegTest.cs
Vlad Jerca 3abaf36c49 Tests: add basic ctor tests
Former-commit-id: 74ea8a42e0
2019-03-03 01:33:39 +02:00

44 lines
1.2 KiB
C#

using FFMpegCore.FFMPEG;
using FFMpegCore.FFMPEG.Exceptions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace FFMpegCore.Test
{
[TestClass]
public class FFMpegTest
{
[TestMethod]
public void CTOR_Default()
{
var encoder = new FFMpeg();
var probe = new FFProbe();
Assert.IsNotNull(encoder);
Assert.IsNotNull(probe);
}
[TestMethod]
public void CTOR_Options()
{
var encoder = new FFMpeg(new FFMpegOptions { RootDirectory = ".\\FFMPEG\\bin" });
var probe = new FFProbe(new FFMpegOptions { RootDirectory = ".\\FFMPEG\\bin" });
Assert.IsNotNull(encoder);
Assert.IsNotNull(probe);
}
[TestMethod]
[ExpectedException(typeof(FFMpegException))]
public void CTOR_Encoder_Options_Invalid()
{
var encoder = new FFMpeg(new FFMpegOptions { RootDirectory = "INVALID_DIR" });
}
[TestMethod]
[ExpectedException(typeof(FFMpegException))]
public void CTOR_Probe_Options_Invalid()
{
var encoder = new FFProbe(new FFMpegOptions { RootDirectory = "INVALID_DIR" });
}
}
}