Click here to Skip to main content
12,629,978 members (32,181 online)
Click here to Skip to main content

Stats

30.6K views
76 downloads
50 bookmarked
Posted

From Mocks to Isolation

, 31 Oct 2008 CPOL
The article discusses how to isolate the code under test from behavior of referenced classes by using mocking frameworks.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Customers
{
    public class Customer
    {
        internal Customer()
        {
        }

        public int CustomerID { get; internal set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public DateTime DateOfBirth { get; set; }
    }
}

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)

Share

About the Author

Vagif Abilov
Architect Miles AS
Norway Norway
Vagif Abilov is a Russian/Norwegian software developer and architect working for Miles. He has more than twenty years of programming experience that includes various programming languages, currently using mostly C# and F#.

Vagif writes articles and speaks at user group sessions and conferences. He is a contributor and maintainer of several open source projects, including Simple.Data OData adapter, Simple.OData.Client and MongOData.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161205.3 | Last Updated 31 Oct 2008
Article Copyright 2008 by Vagif Abilov
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid