public async Task ReturnCorrectQueryByIdResult()
        {
            var(connection, options) = await CreateUniqueMockDbConnectionForThisTest();

            try
            {
                using (var context = new FittifyContext(options))
                {
                    var entityFromContext = await context
                                            .WeightLiftingSets
                                            .Include(i => i.ExerciseHistory)
                                            .FirstOrDefaultAsync(w => w.Id == 2);

                    var serializedEntitesFromContext = JsonConvert.SerializeObject(entityFromContext,
                                                                                   new JsonSerializerSettings()
                    {
                        ReferenceLoopHandling = ReferenceLoopHandling.Ignore
                    });

                    var repo   = new WeightLiftingSetRepository(context);
                    var entity = await repo.GetById(2);

                    var serializedEntityFromRepo = JsonConvert.SerializeObject(entity,
                                                                               new JsonSerializerSettings()
                    {
                        ReferenceLoopHandling = ReferenceLoopHandling.Ignore
                    });
                    Assert.AreEqual(serializedEntitesFromContext, serializedEntityFromRepo);
                }
            }
            finally
            {
                connection.Close();
            }
        }
        public async Task ReturnCorrectlyQueriedCollection()
        {
            var(connection, options) = await CreateUniqueMockDbConnectionForThisTest();

            try
            {
                using (var context = new FittifyContext(options))
                {
                    var entitiesFromContext = await context
                                              .WeightLiftingSets
                                              .Where(w => w.OwnerGuid == _ownerGuid)
                                              .Include(i => i.ExerciseHistory)
                                              .ToListAsync();

                    var serializedEntitesFromContext = JsonConvert.SerializeObject(entitiesFromContext,
                                                                                   new JsonSerializerSettings()
                    {
                        ReferenceLoopHandling = ReferenceLoopHandling.Ignore
                    });

                    var resourceParameters =
                        new WeightLiftingSetResourceParameters()
                    {
                        OwnerGuid         = _ownerGuid,
                        ExerciseHistoryId = 2
                    };
                    var repo       = new WeightLiftingSetRepository(context);
                    var collection = await repo.GetPagedCollection(resourceParameters);

                    var serializedEntitiesFromRepo = JsonConvert.SerializeObject(collection,
                                                                                 new JsonSerializerSettings()
                    {
                        ReferenceLoopHandling = ReferenceLoopHandling.Ignore
                    });
                    Assert.AreEqual(serializedEntitesFromContext, serializedEntitiesFromRepo);
                }
            }
            finally
            {
                connection.Close();
            }
        }