public void GetAllPresentations_returns_empty_if_thereAreNoPresentations()
        {
            var connection = new SqliteConnection("DataSource=:memory:");

            connection.Open();

            try
            {
                var options = new DbContextOptionsBuilder <PlanificatorDbContext>()
                              .UseSqlite(connection)
                              .Options;

                using (var context = new PlanificatorDbContext(options))
                {
                    context.Database.EnsureCreated();

                    var query = new PresentationRepository(context);

                    Assert.Empty(query.GetAllPresentations());
                }
            }
            finally
            {
                connection.Close();
            }
        }
        public async Task GetAllPresentations_returns_all_presentationsAsync()
        {
            var connection = new SqliteConnection("DataSource=:memory:");

            connection.Open();

            try
            {
                var options = new DbContextOptionsBuilder <PlanificatorDbContext>()
                              .UseSqlite(connection)
                              .Options;

                using (var context = new PlanificatorDbContext(options))
                {
                    context.Database.EnsureCreated();

                    var service = new PresentationManager(context);
                    var query   = new PresentationRepository(context);

                    var testData1 = new PresentationRepositoryTestsData();
                    var testData2 = new PresentationRepositoryTestsData();
                    var testData3 = new PresentationRepositoryTestsData();

                    List <Presentation> presentations = new List <Presentation>();
                    presentations.Add(testData1.presentation);
                    presentations.Add(testData2.presentation);
                    presentations.Add(testData3.presentation);

                    await service.AddPresentation(testData1.presentationTags);

                    await service.AddPresentation(testData2.presentationTags);

                    await service.AddPresentation(testData3.presentationTags);

                    context.SaveChanges();

                    Assert.Equal(context.Presentations.Count(), query.GetAllPresentations().Count());
                    Assert.Equal(presentations, query.GetAllPresentations());
                }
            }
            finally
            {
                connection.Close();
            }
        }