From e821bb03a3ee885425b8c6ae6fe56d46fda9f773 Mon Sep 17 00:00:00 2001 From: Thomas Broust Date: Tue, 7 Oct 2014 10:04:09 +0200 Subject: [PATCH] Adds unit test for boostrapper Former-commit-id: a52ae1a608a1968c34eb4e0d958e609a3f3481aa Former-commit-id: b592043e7ba58b60625f0fe344966ef8aa6e65c9 --- .../ImageProcessorBootrapperTests.cs | 31 +++++++++++++++++++ .../ImageProcessor.UnitTests.csproj | 1 + 2 files changed, 32 insertions(+) create mode 100644 src/ImageProcessor.UnitTests/Configuration/ImageProcessorBootrapperTests.cs diff --git a/src/ImageProcessor.UnitTests/Configuration/ImageProcessorBootrapperTests.cs b/src/ImageProcessor.UnitTests/Configuration/ImageProcessorBootrapperTests.cs new file mode 100644 index 0000000000..1e394e8652 --- /dev/null +++ b/src/ImageProcessor.UnitTests/Configuration/ImageProcessorBootrapperTests.cs @@ -0,0 +1,31 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) James South. +// Licensed under the Apache License, Version 2.0. +// +// -------------------------------------------------------------------------------------------------------------------- +namespace ImageProcessor.UnitTests.Configuration +{ + using System; + using System.Linq; + + using FluentAssertions; + using NUnit.Framework; + + using ImageProcessor.Configuration; + + /// + /// Test harness for the ImageProcessor bootstrapper tests + /// + [TestFixture] + public class ImageProcessorBootrapperTests + { + [Test] + public void Singleton_is_instantiated() + { + ImageProcessorBootstrapper.Instance.SupportedImageFormats.Count().Should().BeGreaterThan(0, "because there should be supported image formats"); + + ImageProcessorBootstrapper.Instance.NativeBinaryFactory.Is64BitEnvironment.Should().Be(Environment.Is64BitProcess); + } + } +} \ No newline at end of file diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj index ee8c333fb0..761706d6b3 100644 --- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj +++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj @@ -54,6 +54,7 @@ + PreserveNewest