static void Main(string[] args) { //DataService data = new DataService(); //DefaultDataGeneration dataGeneration = new DefaultDataGeneration(); RandomDataGeneration ranDataGeneration = new RandomDataGeneration(); DataChamber chamber = new DataChamber(); //DatabaseActions databaseActions = new DatabaseActions(chamber, dataGeneration); DatabaseActions databaseActions = new DatabaseActions(chamber, ranDataGeneration); DataService data = new DataService(databaseActions); data.ListAllUsers(); System.Console.WriteLine("\n"); data.ListCatalog(); System.Console.WriteLine("\n"); data.ListAllProcessStates(); System.Console.WriteLine("\n"); data.ListAllEvents(); System.Console.WriteLine("\n"); data.SearchForUserName("Wojtek"); System.Console.WriteLine("\n"); data.SearchForAuthorName("Andrzej"); System.Console.WriteLine("\n"); data.SearchBetweenDates(new DateTime(10, 10, 10), (new DateTime(2017, 10, 10))); System.Console.WriteLine("\n"); System.Console.ReadKey(); }
public void RandomFillTest() { RandomDataGeneration ranDataGeneration = new RandomDataGeneration(); DataChamber chamber = new DataChamber(); DatabaseActions databaseActions = new DatabaseActions(chamber, ranDataGeneration); Assert.AreEqual(10, databaseActions.ReadAllCatalogs().Count); Assert.AreEqual(10, databaseActions.ReadAllUsers().Count); Assert.AreEqual(10, databaseActions.ReadAllProcessStates().Count); Assert.AreEqual(10, databaseActions.ReadAllEvents().Count); }