Static Public Member Functions | |
| static void | TestDatabase (IPersistentData database) |
| Runs a through test on an IPersistentData object. Using default values. | |
| static void | TestDatabase (IPersistentData database, int literatureCount, int projectCount, int peopleCount, int commentLevel, int commentCount, int tagCount) |
| Runs a through test on an IPersistentData object. It creates alot of data which it then uses the database to save. Then it attempts to load all data again and compare it to the generated data. If they are the same. Then it works. | |
Static Protected Member Functions | |
| static void | TestComments (List< Comment > list, List< Comment > list_2) |
| A recursive test of all comments and their children in a list. Comparing them to comments in another list. | |
| static void | CreateShitloadOfComments (int level, int commentCount, DataContainer data, List< Comment > comments, Dictionary< int, Comment > allComments, CommentType type) |
| Creates comments and adds new comments to those comments. This is a recursive algorithm. The level parameter is decreased at each run and the algorithm stops when level reaches 0. | |
Definition at line 17 of file PersistentDataTest.cs.
| static void Server.Test.PersistentDataTest.TestDatabase | ( | IPersistentData | database | ) | [static] |
Runs a through test on an IPersistentData object. Using default values.
| database | IPersistentData to test |
Definition at line 23 of file PersistentDataTest.cs.
| static void Server.Test.PersistentDataTest.TestDatabase | ( | IPersistentData | database, | |
| int | literatureCount, | |||
| int | projectCount, | |||
| int | peopleCount, | |||
| int | commentLevel, | |||
| int | commentCount, | |||
| int | tagCount | |||
| ) | [static] |
Runs a through test on an IPersistentData object. It creates alot of data which it then uses the database to save. Then it attempts to load all data again and compare it to the generated data. If they are the same. Then it works.
| database | IPersistentData to test |
Definition at line 32 of file PersistentDataTest.cs.
References Server.Literature.Comments, Server.Reference.Comments, Server.Project.GetPerson(), Server.Person.Info, Server.Literature.Info, Server.Reference.Info, Server.Role.Info, Server.Project.Info, Server.Data.DataContainer.LiteratureTable, Server.Data.IPersistentData.LoadData(), Server.Data.DataContainer.PersonTable, Server.Data.DataContainer.ProjectTable, Server.Project.References, Server.Data.IPersistentData.SaveData(), and Server.Data.DataContainer.Tags.
Here is the call graph for this function:

| static void Server.Test.PersistentDataTest.TestComments | ( | List< Comment > | list, | |
| List< Comment > | list_2 | |||
| ) | [static, protected] |
A recursive test of all comments and their children in a list. Comparing them to comments in another list.
| list | First list of comments. | |
| list_2 | Second list of comments, for the test to be successful this must be identical to the first list. |
Definition at line 231 of file PersistentDataTest.cs.
References Server.Comment.Comments, Server.Comment.Date, Server.Comment.Poster, Server.Comment.Text, Server.Comment.Title, and Server.Person.UserName.
| static void Server.Test.PersistentDataTest.CreateShitloadOfComments | ( | int | level, | |
| int | commentCount, | |||
| DataContainer | data, | |||
| List< Comment > | comments, | |||
| Dictionary< int, Comment > | allComments, | |||
| CommentType | type | |||
| ) | [static, protected] |
Creates comments and adds new comments to those comments. This is a recursive algorithm. The level parameter is decreased at each run and the algorithm stops when level reaches 0.
| level | Depth of comment structure. | |
| commentCount | Amount of comments to create at each level | |
| data | The data table (used to fetch random people as posters of comments) | |
| comments | The list of comments that needs to be populated. | |
| allComments | All comments created using this algorithm. | |
| type | The type of comments created. At execution of first run this is set to the type of the "comments" list' parent. |
Definition at line 264 of file PersistentDataTest.cs.
References Server.Data.DataContainer.PersonTable.
1.5.1-p1