Collaboration diagram for HouseOver.THARM.UnitTest.CatalogueDataTest:
Public Member Functions | |
[SetUp] void | Init () |
Creates a bunch of data. | |
[Test] void | InputTest () |
Tests if the items from Init() actually was added. | |
[SetUp] void | Init () |
Creates a bunch of data. | |
[Test] void | InputTest () |
Tests if the items from Init() actually was added. | |
Private Attributes | |
CatalogueData | data |
Definition at line 17 of file CatalogueDataTest.cs.
[SetUp] void HouseOver.THARM.UnitTest.CatalogueDataTest.Init | ( | ) |
Creates a bunch of data.
Definition at line 25 of file CatalogueDataTest.cs.
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 }
[Test] void HouseOver.THARM.UnitTest.CatalogueDataTest.InputTest | ( | ) |
Tests if the items from Init() actually was added.
Definition at line 48 of file CatalogueDataTest.cs.
00049 { 00050 Assert.AreEqual(data.Count, 3); // Number of customers 00051 Assert.AreEqual(data.CustomersWithProfiles.Count, 2); // Test number of profiles 00052 Assert.AreEqual(data.CustomersWithSales.Count, 2); // Test number of sales 00053 }
[SetUp] void HouseOver.THARM.UnitTest.CatalogueDataTest.Init | ( | ) |
Creates a bunch of data.
Definition at line 25 of file CatalogueDataTest.cs.
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 }
[Test] void HouseOver.THARM.UnitTest.CatalogueDataTest.InputTest | ( | ) |
Tests if the items from Init() actually was added.
Definition at line 48 of file CatalogueDataTest.cs.
00049 { 00050 Assert.AreEqual(data.Count, 3); // Number of customers 00051 Assert.AreEqual(data.CustomersWithProfiles.Count, 2); // Test number of profiles 00052 Assert.AreEqual(data.CustomersWithSales.Count, 2); // Test number of sales 00053 }
Definition at line 19 of file CatalogueDataTest.cs.