mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
3abaf36c49
Former-commit-id: 74ea8a42e0
44 lines
1.2 KiB
C#
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" });
|
|
}
|
|
}
|
|
}
|