diff --git a/AllReady.Processing.UnitTest/AllReady.Processing.UnitTest.csproj b/AllReady.Processing.UnitTest/AllReady.Processing.UnitTest.csproj
new file mode 100644
index 0000000..c8be6c6
--- /dev/null
+++ b/AllReady.Processing.UnitTest/AllReady.Processing.UnitTest.csproj
@@ -0,0 +1,22 @@
+
+
+
+ netcoreapp2.0
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AllReady.Processing.UnitTest/ImageHelpers.cs b/AllReady.Processing.UnitTest/ImageHelpers.cs
new file mode 100644
index 0000000..d5c6497
--- /dev/null
+++ b/AllReady.Processing.UnitTest/ImageHelpers.cs
@@ -0,0 +1,31 @@
+using System.IO;
+using Shouldly;
+using SixLabors.ImageSharp;
+using SixLabors.ImageSharp.Formats;
+
+namespace AllReady.Processing.UnitTest
+{
+ public static class ImageHelpers
+ {
+ public static Stream GetImageStream(int width, int height, IImageFormat format = null)
+ {
+ var stream = new MemoryStream();
+ using (var img = new Image(width, height))
+ {
+ img.Save(stream, format ?? ImageFormats.Png);
+ }
+
+ stream.Seek(0, SeekOrigin.Begin);
+ return stream;
+ }
+
+ public static void ShouldBeImageWithDimensions(this Stream stream, int width, int height)
+ {
+ using (var img = Image.Load(stream))
+ {
+ img.Width.ShouldBe(width);
+ img.Height.ShouldBe(height);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AllReady.Processing.UnitTest/ImageResizeShould.cs b/AllReady.Processing.UnitTest/ImageResizeShould.cs
new file mode 100644
index 0000000..66eae9f
--- /dev/null
+++ b/AllReady.Processing.UnitTest/ImageResizeShould.cs
@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using Microsoft.Azure.WebJobs.Host;
+using Moq;
+using Shouldly;
+using SixLabors.ImageSharp;
+using SixLabors.ImageSharp.Formats;
+using Xunit;
+
+namespace AllReady.Processing.UnitTest
+{
+ public class ImageResizeShould
+ {
+ private const string BlobName = "/container/image.png";
+ private readonly TraceWriter _log = new Mock(TraceLevel.Verbose).Object;
+
+ public ImageResizeShould()
+ {
+ Environment.SetEnvironmentVariable("maxDimension", "400");
+ }
+
+ [Fact]
+ public void Not_resize_an_image_within_maxDimensions_in_both_directions()
+ {
+ using (var src = ImageHelpers.GetImageStream(400, 400))
+ using (var result = new MemoryStream())
+ {
+ ImageResize.Run(src, BlobName, result, _log);
+
+ result.Seek(0, SeekOrigin.Begin);
+ result.ReadByte().ShouldBe(-1);
+ }
+ }
+
+ [Fact]
+ public void Resize_an_image_with_width_larger_than_maxDimensions()
+ {
+ using (var src = ImageHelpers.GetImageStream(700, 400))
+ using (var result = new MemoryStream())
+ {
+ ImageResize.Run(src, BlobName, result, _log);
+
+ result.Seek(0, SeekOrigin.Begin);
+ result.ShouldBeImageWithDimensions(400, 228);
+ }
+ }
+
+ [Fact]
+ public void Resize_an_image_with_height_larger_than_maxDimensions()
+ {
+ using (var src = ImageHelpers.GetImageStream(250, 500))
+ using (var result = new MemoryStream())
+ {
+ ImageResize.Run(src, BlobName, result, _log);
+
+ result.Seek(0, SeekOrigin.Begin);
+ result.ShouldBeImageWithDimensions(200, 400);
+ }
+ }
+
+ [Fact]
+ public void Resize_an_image_with_both_dimensions_larger_than_maxDimensions()
+ {
+ using (var src = ImageHelpers.GetImageStream(500, 650))
+ using (var result = new MemoryStream())
+ {
+ ImageResize.Run(src, BlobName, result, _log);
+
+ result.Seek(0, SeekOrigin.Begin);
+ result.ShouldBeImageWithDimensions(307, 400);
+ }
+ }
+
+ public static readonly IEnumerable