public async Task GetAllLikesByProgramIdAsyncShouldReturnLikesSuccessfully()
        {
            var options = new DbContextOptionsBuilder <MyCalisthenicAppDbContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString())
                          .Options;

            var dbContext = new MyCalisthenicAppDbContext(options);

            IHttpContextAccessor httpContextAccessor = new HttpContextAccessor();

            var usersService = new UsersService(httpContextAccessor, dbContext, null);

            var mockMapper = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new MyCalisthenicAppProfile());
            });

            var mapper = mockMapper.CreateMapper();

            var categoriesService = new CategoriesService(dbContext, mapper);

            var programsService = new ProgramsService(dbContext, mapper, usersService, categoriesService);

            var category = new ProgramCategory
            {
                Name        = CategoryName,
                Description = CategoryDescription,
            };

            await dbContext.ProgramCategories.AddAsync(category);

            await dbContext.SaveChangesAsync();

            for (int i = 0; i < 3; i++)
            {
                var program = new Program
                {
                    Title       = ProgramTitle,
                    Description = ProgramDescription,
                    CategoryId  = category.Id,
                };

                await dbContext.Programs.AddAsync(program);

                await dbContext.SaveChangesAsync();
            }

            var programToReturn = new Program
            {
                Id          = ProgramId,
                Title       = ProgramTitle,
                Description = ProgramDescription,
                CategoryId  = category.Id,
            };

            programToReturn.LikesUsersNames.Add(ProgramLike);

            await dbContext.Programs.AddAsync(programToReturn);

            await dbContext.SaveChangesAsync();

            var expected = await programsService.GetAllLikesByProgramIdAsync(ProgramId);

            Assert.Equal(1, expected.Count);
        }
        public async Task GetAllLikesByProgramIdAsyncShouldThrowExceptionIfProgramIsNull()
        {
            var options = new DbContextOptionsBuilder <MyCalisthenicAppDbContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString())
                          .Options;

            var dbContext = new MyCalisthenicAppDbContext(options);

            IHttpContextAccessor httpContextAccessor = new HttpContextAccessor();

            var usersService = new UsersService(httpContextAccessor, dbContext, null);

            var mockMapper = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new MyCalisthenicAppProfile());
            });

            var mapper = mockMapper.CreateMapper();

            var categoriesService = new CategoriesService(dbContext, mapper);

            var programsService = new ProgramsService(dbContext, mapper, usersService, categoriesService);

            var exception = await Assert.ThrowsAsync <ArgumentNullException>(async() => await programsService.GetAllLikesByProgramIdAsync(ProgramId));

            Assert.IsType <ArgumentNullException>(exception);
        }