D:\Unit Testing\MSDN Article\Automated White Box Testing For Legacy Systems\Automated White Box Testing For Legacy Systems\SourceCode\FabrikamSports.Legacy\Product.cs

Modules/Types/MethodsDynamic Coverage (blocks)
User Code Under TestUser Or Test Code
first
// --------------------------------------------------------------------------------------------------------------------- 
// <copyright file="Product.cs" company="Microsoft">
//   Product
// </copyright>
// <summary>
//   Defines the Product type.
// </summary>
// ---------------------------------------------------------------------------------------------------------------------
// ==++==
// 
//   Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// ==--==
namespace FabrikamSports
{
    using System;

    /// <summary>
    /// The Product for the Company.
    /// </summary>
    public class Product
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Product"/> class.
        /// </summary>
        /// <param name="productName">Name of the product.</param>
        /// <param name="description">The description.</param>
        top0000,6public Product(string productName, string description)
        {
            0006,6this.Name = productName;
            000d,6this.Description = description;
            0014,6this.ProductId = Guid.NewGuid();
        001f,6}

        /// <summary>
        /// Gets the product id.
        /// </summary>
        /// <value>The product id.</value>
        public Guid ProductId
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the name of the product.
        /// </summary>
        /// <value>The name of the product.</value>
        public string Name
        {
            get; private set;
        }

        /// <summary>
        /// Gets the description of the product.
        /// </summary>
        /// <value>The description.</value>
        public string Description { get; private set; }
    }
}

Copyright (c) Microsoft Corporation. All rights reserved.
Copy full source to clipboard