2018-10-04 19:49:24 +00:00
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
2018-08-18 16:55:25 +00:00
|
|
|
|
using Quasar.Common.Video.Compression;
|
2018-10-04 19:49:24 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Drawing;
|
2015-05-13 20:22:35 +00:00
|
|
|
|
|
2018-10-04 19:49:24 +00:00
|
|
|
|
namespace Quasar.Common.Tests.Compression
|
2015-05-13 20:22:35 +00:00
|
|
|
|
{
|
|
|
|
|
[TestClass]
|
|
|
|
|
public class JpgCompressionTests
|
|
|
|
|
{
|
2015-07-31 08:01:41 +00:00
|
|
|
|
[TestMethod, TestCategory("Compression")]
|
2015-05-14 08:26:28 +00:00
|
|
|
|
public void CompressionTest()
|
2015-05-13 20:22:35 +00:00
|
|
|
|
{
|
|
|
|
|
var quality = Int64.MaxValue;
|
|
|
|
|
var jpg = new JpgCompression(quality);
|
|
|
|
|
var bitmap = new Bitmap(200, 200);
|
|
|
|
|
|
|
|
|
|
var result = jpg.Compress(bitmap);
|
|
|
|
|
|
|
|
|
|
Assert.IsNotNull(result);
|
|
|
|
|
CollectionAssert.AllItemsAreNotNull(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-10-05 21:58:09 +00:00
|
|
|
|
}
|