HouseOver.THARM.UnitTest.CatalogueDataTest Class Reference

This class is a unit test class for the CatalogueData class. The class tests the add/remove methods using a black box test. More...

Collaboration diagram for HouseOver.THARM.UnitTest.CatalogueDataTest:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

This class is a unit test class for the CatalogueData class. The class tests the add/remove methods using a black box test.

Definition at line 17 of file CatalogueDataTest.cs.


Member Function Documentation

[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         }


Member Data Documentation

CatalogueData HouseOver::THARM::UnitTest.CatalogueDataTest::data [private]

Definition at line 19 of file CatalogueDataTest.cs.


The documentation for this class was generated from the following files:
Generated on Wed Jan 10 03:43:24 2007 for THARM by  doxygen 1.5.1-p1