Collaboration diagram for HouseOver.THARM.UnitTest.RealtyManagerTest:
Public Member Functions | |
[SetUp] void | Init () |
Set up the data by creating a customer and adding a few sales. | |
[Test] void | TestProfileMatch () |
Test if the GetAllSalesWithinMaxPrice() method works. | |
[SetUp] void | Init () |
Set up the data by creating a customer and adding a few sales. | |
[Test] void | TestProfileMatch () |
Test if the GetAllSalesWithinMaxPrice() method works. | |
Private Attributes | |
CatalogueData | data |
RealtyManager | rm |
Customer | c |
Definition at line 14 of file RealtyManagerTest.cs.
[SetUp] void HouseOver.THARM.UnitTest.RealtyManagerTest.Init | ( | ) |
Set up the data by creating a customer and adding a few sales.
Definition at line 25 of file RealtyManagerTest.cs.
00026 { 00027 data = new CatalogueData(); 00028 rm = new RealtyManager(data); 00029 00030 c = new Customer(1000, "Some name"); 00031 00032 data.Add(c); 00033 00034 data.Add(new Sale(30000, DateTime.Now, new House(10, 1200, 50, 1980, 3, 100), c)); 00035 data.Add(new Sale(40000, DateTime.Now, new Apartment(12, 1300, 60, 1975, 2, 5), c)); 00036 data.Add(new Sale(30000, DateTime.Now, new Domicile(14, 1200, 55, 1960, 2), c)); 00037 }
[Test] void HouseOver.THARM.UnitTest.RealtyManagerTest.TestProfileMatch | ( | ) |
Test if the GetAllSalesWithinMaxPrice() method works.
Definition at line 43 of file RealtyManagerTest.cs.
00044 { 00045 Profile p = new Profile(c, 35000, typeof(House)); 00046 00047 data.Add(p); 00048 00049 List<Sale> sales = rm.GetAllSalesWithinMaxPrice(30000); 00050 List<Sale> potential = rm.FindPotentialItems(p); 00051 00052 Assert.AreEqual(sales.Count, 2); 00053 Assert.AreEqual(potential.Count, 1); 00054 }
[SetUp] void HouseOver.THARM.UnitTest.RealtyManagerTest.Init | ( | ) |
Set up the data by creating a customer and adding a few sales.
Definition at line 25 of file RealtyManagerTest.cs.
00026 { 00027 data = new CatalogueData(); 00028 rm = new RealtyManager(data); 00029 00030 c = new Customer(1000, "Some name"); 00031 00032 data.Add(c); 00033 00034 data.Add(new Sale(30000, DateTime.Now, new House(10, 1200, 50, 1980, 3, 100), c)); 00035 data.Add(new Sale(40000, DateTime.Now, new Apartment(12, 1300, 60, 1975, 2, 5), c)); 00036 data.Add(new Sale(30000, DateTime.Now, new Domicile(14, 1200, 55, 1960, 2), c)); 00037 }
[Test] void HouseOver.THARM.UnitTest.RealtyManagerTest.TestProfileMatch | ( | ) |
Test if the GetAllSalesWithinMaxPrice() method works.
Definition at line 43 of file RealtyManagerTest.cs.
00044 { 00045 Profile p = new Profile(c, 35000, typeof(House)); 00046 00047 data.Add(p); 00048 00049 List<Sale> sales = rm.GetAllSalesWithinMaxPrice(30000); 00050 List<Sale> potential = rm.FindPotentialItems(p); 00051 00052 Assert.AreEqual(sales.Count, 2); 00053 Assert.AreEqual(potential.Count, 1); 00054 }
Definition at line 16 of file RealtyManagerTest.cs.
Definition at line 17 of file RealtyManagerTest.cs.
Definition at line 19 of file RealtyManagerTest.cs.