2015-05-13 20:22:35 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
|
using xClient.Core.Compression;
|
|
|
|
|
|
|
|
|
|
namespace xClient.Tests.Core.Compression
|
|
|
|
|
{
|
|
|
|
|
[TestClass]
|
|
|
|
|
public class JpgCompressionTests
|
|
|
|
|
{
|
|
|
|
|
[TestMethod]
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|