Click here to Skip to main content
15,895,746 members
Articles / Desktop Programming / WPF

WPF Unit Testing

Rate me:
Please Sign up or sign in to vote.
4.71/5 (14 votes)
22 Dec 2007CPOL4 min read 90K   1.6K   49  
How to unit test WPF applications
using System;
using System.Collections.Generic;
using System.Text;

namespace WPFSampleApplication
{
    /// <summary>
    /// Class that makes cacluations of doubles
    /// </summary>
    public class Calculations
    {
        /// <summary>
        /// Sums 2 doubles together
        /// </summary>
        /// <param name="x">The double to sum</param>
        /// <param name="y">The double to sum</param>
        /// <returns>The sum of the 2 doubles specified</returns>
        public double Sum(double x, double y)
        {
            return x + y;
        }
    }
}

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
Other Uniblue Systems (www.uniblue.com)
Malta Malta
Check out my Blog
http://marlongrech.wordpress.com/

Currently building a WPF Controls library aka AvalonControlsLibrary
http://marlongrech.wordpress.com/avalon-controls-library/

Comments and Discussions