// --------------------------------------------------------------------------------------------------------------------
//
// Copyright (c) James South.
// Licensed under the Apache License, Version 2.0.
//
//
// Runs unit tests on the extension methods
//
// --------------------------------------------------------------------------------------------------------------------
namespace ImageProcessor.UnitTests
{
using System;
using Common.Extensions;
using NUnit.Framework;
///
/// Provides a test harness for the integer extension class
///
[TestFixture]
public class IntegerExtensionsUnitTests
{
///
/// Tests the "ToByte" extension
///
/// Integer input
/// Expected result
[Test]
[TestCase(21, 0x15)]
[TestCase(190, 0xBE)]
[TestCase(3156, 0xFF)]
public void ToByteTest(int input, byte expected)
{
var result = input.ToByte();
Assert.AreEqual(expected, result);
}
}
}