NUnit using NMock Code Review

Define the DataAccess Interface

Code Download

  • Download Description:nunit nmock download
  • .NET Framework:3.5
  • .NET Language:C#
  • Date Published:2009-07-01
  • Download Size:135 KB

Code Review

Code Walkthrough

* Based on NUnit version 2.4.8

Define the IShoppingDataAccess interface, which defines any actions that can be performed by the application classes.

public interface IShoppingDataAccess { String GetProductName(Int32 productID); Int32 GetUnitPrice(Int32 productID); List<BasketItem> LoadBasketItems(Guid basketID); void SaveBasketItems(Guid basketID, List<BasketItem> basketItems); }

These actions will usually involve querying or updating one or more databases.