public async Task TryLogDayAsync_DuplicateDate_ReturnsTrue()
        {
            // arrange
            var service   = new TrackerLogService(_database, _logger);
            int trackerId = 1;
            var day       = new DateTime(2020, 1, 1);

            // act
            bool successful = await service.TryLogDayAsync(day, trackerId);

            // assert
            Assert.True(successful);
        }
        public async Task TryLogDayAsync_NewTrackerId_ReturnsFalse()
        {
            // arrange
            var service   = new TrackerLogService(_database, _logger);
            int trackerId = 100;
            var day       = DateTime.Now.Date;

            // act
            bool successful = await service.TryLogDayAsync(day, trackerId);

            // assert
            Assert.False(successful);
        }
        public async Task TryLogDayAsync_ExistsInDb()
        {
            // arrange
            var service   = new TrackerLogService(_database, _logger);
            int trackerId = 1;
            var day       = DateTime.Now.Date;

            // act
            await service.TryLogDayAsync(day, trackerId);

            var loggedDay = await _context.Table <LoggedDay>()
                            .FirstOrDefaultAsync(d => d.TrackerId == trackerId && d.Date == day);

            // assert
            Assert.NotNull(loggedDay);
        }