Server.Test.CatalogueTest Class Reference

Tests the Catalogue class. It's a blackbox test. More...

Collaboration diagram for Server.Test.CatalogueTest:

Collaboration graph
[legend]
List of all members.

Public Member Functions

[SetUp] void Init ()
 Initializes a new Catalogue object at every test. Also resets the UniquelyIdentifiable counter. Uses a DummyData object to not store data persistently.
[Test] void CreateProjectTest ()
 Registers a test user and a single project. Then gets the project from the catalogue comparing it with the previously created project.
[Test] void DeleteProjectTest ()
 Creates a project and then proceeds to delete it again. Checks whether or not the project was actually deleted.
[Test] void GetSpecificProjectTest ()
 Creates a couple of Projects and attempts to get them from the catalogue.
[Test] void ListAllProjectsTest ()
 Creates some projects and attempts to list them. Succeeds if the ones returned by the list function are the same as the ones created.
[Test] void UpdateProjectTest ()
 Creates some projects and attempts to alter the projects variables. Checks if succesful.
[Test] void CreateLiteratureTest ()
 Creates some literature and checks whether or not they were actually created.
[Test] void GetLiteratureTest ()
 Creates some literature and checks if they can be retrieved again.
[Test] void ListLiteratureTest ()
 Creates alot of literature on the catalogue, lists them again and compare them to the previously added data.
[Test] void DeleteLiteratureTest ()
 Creates some literature and deletes them again.
[Test] void UpdateLiteratureTest ()
 Creates some literature and attempts to update the literature data.
[Test] void RegisterAndGetUserTest ()
 Registers a new user and checks if it was actually registered.
[Test] void GetPersonInfoTest ()
 Creates a user and attempts to get that users info again.
[Test] void AddRemoveTagsTest ()
 Adds some tags, checks if the added tags were created correctly and then deletes them some again, verifying that it was succesfull.
void MakeData ()
 Creates some test data.
[Test] void GetTags ()
 Test the ability to add and get tags from the catalogue.
[Test] void ReferenceTest ()
 Creates references and attempts to list get update and delete them.
[Test] void ReviewTest ()
 Creates reviews and attempts to list get update and delete them.
[Test] void SuggestionTest ()
 Creates suggestions and attempts to list get update and delete them.
[Test] void Search ()
 Creates some random data and then attempts to find it in the catalogue using the search function.

Private Member Functions

List< TagInfoCreateTags ()
 Creates a list of test data tags.

Private Attributes

IPersistentData pd
Catalogue catalogue
string creator = "someGuy"
DateTime start = DateTime.Now
string subject = "Something subject"
string title = "some title"
string department = "some department"
string author = "SomeOne"
string source = "somewhere"
string summary = "yesyes"
LiteratureType lt = LiteratureType.Book
int id

Detailed Description

Tests the Catalogue class. It's a blackbox test.

Definition at line 19 of file CatalogueTest.cs.


Member Function Documentation

[SetUp] void Server.Test.CatalogueTest.Init (  ) 

Initializes a new Catalogue object at every test. Also resets the UniquelyIdentifiable counter. Uses a DummyData object to not store data persistently.

Definition at line 45 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.CreateProjectTest (  ) 

Registers a test user and a single project. Then gets the project from the catalogue comparing it with the previously created project.

Definition at line 56 of file CatalogueTest.cs.

References Shared.ProjectInfo.id.

[Test] void Server.Test.CatalogueTest.DeleteProjectTest (  ) 

Creates a project and then proceeds to delete it again. Checks whether or not the project was actually deleted.

Definition at line 68 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.GetSpecificProjectTest (  ) 

Creates a couple of Projects and attempts to get them from the catalogue.

Definition at line 78 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.ListAllProjectsTest (  ) 

Creates some projects and attempts to list them. Succeeds if the ones returned by the list function are the same as the ones created.

Definition at line 91 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.UpdateProjectTest (  ) 

Creates some projects and attempts to alter the projects variables. Checks if succesful.

Definition at line 109 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.CreateLiteratureTest (  ) 

Creates some literature and checks whether or not they were actually created.

Definition at line 129 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.GetLiteratureTest (  ) 

Creates some literature and checks if they can be retrieved again.

Definition at line 145 of file CatalogueTest.cs.

References Shared.LiteratureInfo.source, and Shared.LiteratureInfo.summary.

[Test] void Server.Test.CatalogueTest.ListLiteratureTest (  ) 

Creates alot of literature on the catalogue, lists them again and compare them to the previously added data.

Definition at line 165 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.DeleteLiteratureTest (  ) 

Creates some literature and deletes them again.

Definition at line 181 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.UpdateLiteratureTest (  ) 

Creates some literature and attempts to update the literature data.

Definition at line 203 of file CatalogueTest.cs.

References Shared.LiteratureInfo.isbn, and Shared.LiteratureInfo.type.

[Test] void Server.Test.CatalogueTest.RegisterAndGetUserTest (  ) 

Registers a new user and checks if it was actually registered.

Definition at line 225 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.GetPersonInfoTest (  ) 

Creates a user and attempts to get that users info again.

Definition at line 240 of file CatalogueTest.cs.

References Shared.PersonInfo.department.

[Test] void Server.Test.CatalogueTest.AddRemoveTagsTest (  ) 

Adds some tags, checks if the added tags were created correctly and then deletes them some again, verifying that it was succesfull.

Definition at line 254 of file CatalogueTest.cs.

void Server.Test.CatalogueTest.MakeData (  ) 

Creates some test data.

Definition at line 278 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.GetTags (  ) 

Test the ability to add and get tags from the catalogue.

Definition at line 302 of file CatalogueTest.cs.

References Shared.StatisticsInfo.ProjectCount.

List<TagInfo> Server.Test.CatalogueTest.CreateTags (  )  [private]

Creates a list of test data tags.

Returns:

Definition at line 349 of file CatalogueTest.cs.

[Test] void Server.Test.CatalogueTest.ReferenceTest (  ) 

Creates references and attempts to list get update and delete them.

Definition at line 379 of file CatalogueTest.cs.

References Shared.ReferenceInfo.date, Shared.ReferenceInfo.literature, Shared.ReferenceInfo.project, Shared.ReferenceInfo.status, and Shared.ReferenceInfo.used.

[Test] void Server.Test.CatalogueTest.ReviewTest (  ) 

Creates reviews and attempts to list get update and delete them.

Definition at line 408 of file CatalogueTest.cs.

References Shared.ReviewInfo.date, Shared.ReviewInfo.literature, Shared.ReviewInfo.person, Shared.ReviewInfo.project, Shared.ReviewInfo.rating, Shared.ReviewInfo.status, Shared.ReviewInfo.text, Shared.ReviewInfo.title, and Shared.ReviewInfo.used.

[Test] void Server.Test.CatalogueTest.SuggestionTest (  ) 

Creates suggestions and attempts to list get update and delete them.

Definition at line 437 of file CatalogueTest.cs.

References Shared.SuggestionInfo.date, Shared.SuggestionInfo.literature, Shared.SuggestionInfo.person, Shared.SuggestionInfo.project, Shared.SuggestionInfo.reason, Shared.SuggestionInfo.status, and Shared.SuggestionInfo.used.

[Test] void Server.Test.CatalogueTest.Search (  ) 

Creates some random data and then attempts to find it in the catalogue using the search function.

Definition at line 466 of file CatalogueTest.cs.

References Shared.ProjectInfo.department, Shared.ProjectInfo.endDate, Shared.ProjectInfo.id, Shared.ProjectInfo.startDate, Shared.ProjectInfo.subject, and Shared.ProjectInfo.title.


The documentation for this class was generated from the following file:
Generated on Thu Dec 21 06:25:29 2006 for SCRAML by  doxygen 1.5.1-p1