00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using NUnit.Framework;
00005 using HouseOver.THARM.Buildings;
00006
00010 namespace HouseOver.THARM.UnitTest
00011 {
00016 [TestFixture]
00017 public class CatalogueDataTest
00018 {
00019 private CatalogueData data;
00020
00024 [SetUp]
00025 public void Init()
00026 {
00027 data = new CatalogueData();
00028
00029 Customer c1 = new Customer(1000, "name1");
00030 Customer c2 = new Customer(2000, "name2");
00031 Customer c3 = new Customer(3000, "name3");
00032
00033 data.Add(c1);
00034 data.Add(c2);
00035 data.Add(c3);
00036
00037 data.Add(new Profile(c1, 50000, typeof(Item)));
00038 data.Add(new Profile(c2, 80000, typeof(Item)));
00039
00040 data.Add(new Sale(40000, DateTime.Now, new House(), c2));
00041 data.Add(new Sale(50000, DateTime.Now, new Castle(), c3));
00042 }
00043
00047 [Test]
00048 public void InputTest()
00049 {
00050 Assert.AreEqual(data.Count, 3);
00051 Assert.AreEqual(data.CustomersWithProfiles.Count, 2);
00052 Assert.AreEqual(data.CustomersWithSales.Count, 2);
00053 }
00054
00055 }
00056 }