mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
parent
e24c0a523a
commit
3abaf36c49
6 changed files with 56 additions and 16 deletions
|
@ -3,21 +3,18 @@
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace FFMpegCore.Tests
|
namespace FFMpegCore.Test
|
||||||
{
|
{
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class ArgumentBuilderTests : BaseTest
|
public class ArgumentBuilderTest : BaseTest
|
||||||
{
|
{
|
||||||
List<string> concatFiles = new List<string>
|
List<string> concatFiles = new List<string>
|
||||||
{ "1.mp4", "2.mp4", "3.mp4", "4.mp4"};
|
{ "1.mp4", "2.mp4", "3.mp4", "4.mp4"};
|
||||||
|
|
||||||
FFArgumentBuilder builder;
|
FFArgumentBuilder builder;
|
||||||
|
|
||||||
public ArgumentBuilderTests() : base()
|
public ArgumentBuilderTest() : base()
|
||||||
{
|
{
|
||||||
builder = new FFArgumentBuilder();
|
builder = new FFArgumentBuilder();
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
using FFMpegCore.Enums;
|
using FFMpegCore.Enums;
|
||||||
using FFMpegCore.Tests.Resources;
|
using FFMpegCore.Test.Resources;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace FFMpegCore.Tests
|
namespace FFMpegCore.Test
|
||||||
{
|
{
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class AudioTest : BaseTest
|
public class AudioTest : BaseTest
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
using System.Configuration;
|
using FFMpegCore.FFMPEG;
|
||||||
|
using FFMpegCore.Test.Resources;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using FFMpegCore.FFMPEG;
|
|
||||||
using FFMpegCore.Tests.Resources;
|
|
||||||
|
|
||||||
namespace FFMpegCore.Tests
|
namespace FFMpegCore.Test
|
||||||
{
|
{
|
||||||
public class BaseTest
|
public class BaseTest
|
||||||
{
|
{
|
||||||
|
|
44
FFMpegCore.Test/FFMpegTest.cs
Normal file
44
FFMpegCore.Test/FFMpegTest.cs
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
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" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using FFMpegCore.Enums;
|
using FFMpegCore.Enums;
|
||||||
|
|
||||||
namespace FFMpegCore.Tests.Resources
|
namespace FFMpegCore.Test.Resources
|
||||||
{
|
{
|
||||||
public enum AudioType
|
public enum AudioType
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
using FFMpegCore.Enums;
|
using FFMpegCore.Enums;
|
||||||
using FFMpegCore.FFMPEG;
|
|
||||||
using FFMpegCore.FFMPEG.Argument;
|
using FFMpegCore.FFMPEG.Argument;
|
||||||
using FFMpegCore.FFMPEG.Enums;
|
using FFMpegCore.FFMPEG.Enums;
|
||||||
using FFMpegCore.Tests.Resources;
|
using FFMpegCore.Test;
|
||||||
|
using FFMpegCore.Test.Resources;
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace FFMpegCore.Tests
|
namespace FFMpegCore.Test
|
||||||
{
|
{
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class VideoTest : BaseTest
|
public class VideoTest : BaseTest
|
||||||
|
|
Loading…
Reference in a new issue