public void GetLastTasksTest() { var dbOptions = new DbContextOptionsBuilder <ApplicationDbContext>().UseInMemoryDatabase(databaseName: "GetLastTasksTest").Options; var postgreOptions = new DbContextOptionsBuilder <PostgreDbContext>().UseInMemoryDatabase(databaseName: "GetLastTasksTest").Options; var dbContext = new ApplicationDbContext(dbOptions); var postgreContext = new PostgreDbContext(postgreOptions); AddTask(postgreContext); var query = new GetDataQuery(dbContext, postgreContext); var result = query.GetLastTasks(); Assert.AreEqual(5, result.Count); }
/// <summary> /// Retrieves data-objects from the service. /// </summary> /// <param name="query">Request for the retrieval of different data-object kinds.</param> /// <returns>The response of the service containing the results of the operation.</returns> public AbstractObject GetData(GetDataQuery query) { PROD_GenericDataAccess service = GetGDAService(); return(service.GetData(query).abstractDataObject); }