using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; using Pariveda.DataAccess35.Business; using System.IO; namespace Pariveda.DataAccess35.Test { [TestFixture] public class SerializerUtilTest { [SetUp] public void Setup() { //Set the DataDirectory variable so that //the app.config can use the correct path to the database string dataDirectory = Path. GetFullPath(@"..\..\..\Pariveda.DataAccess35.Web\App_Data\"); AppDomain.CurrentDomain.SetData("DataDirectory", dataDirectory); } [Test] public void Clone_AllCustomers_CloneIsEqualToOriginal() { CustomerService service = new CustomerService(); var customerLookups = service.GetLookupList(); foreach (var customerLookup in customerLookups) { Customer customer = service.Get(customerLookup.Key, true); Customer clonedCustomer = customer.Clone(); customer.ShouldEqual(clonedCustomer); } } } }