Click here to Skip to main content
15,881,882 members
Articles / Programming Languages / C#

Dynamic Unit Testing

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
1 Sep 2011CPOL3 min read 28.7K   172   16  
Dynamic Unit Testing
using System;

namespace Business
{
    public static class RangeExtensions
    {
        public static bool Between<T>(this IComparable<T> value, IRange<T> range) where T : IComparable<T>
        {
            return value.CompareTo(range.Start) >= 0 && value.CompareTo(range.End) <= 0;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Italy Italy
My name is Idalgo Cantelli. I'm a software developer skilled in .Net technologies. I work with .Net since February, 2002. I also have a strong experience as a technical trainer, having taught in more than thirty classroom courses. I'm MCTS and MCPD-EAD on .Net 2.0, planning an upgrade to 3.5.

Comments and Discussions