public async Task PhoneBook_Append()
        {
            // Arrange
            var record = fakerPhoneRecord.Generate();

            // Act
            await PhoneBookWithLinkedList.AppendAsync(fileLocation, record.Name, record.Number);

            // Assert
            var json      = File.ReadAllText(fileLocation);
            var phonebook = JsonSerializer.Deserialize <PhoneRecordNode>(json);

            phonebook.record.Name
            .Should()
            .Equals(record.Name);
        }
        public async Task PhoneBookFile_AppendAndSort()
        {
            // Arrange
            for (int i = 0; i < recordsToCreate; i++)
            {
                var record = fakerPhoneRecord.Generate();
                await PhoneBookWithLinkedList.AppendAsync(fileLocation, record.Name, record.Number);
            }

            // Act
            var actualList = await PhoneBookWithLinkedList.GetListAsync(fileLocation, 0, recordsToCreate);

            // Assert
            actualList
            .Should()
            .Equal(actualList.ToList().OrderBy(record => record.Name));
        }
        public async Task PhoneBook_GetList()
        {
            // Arrange
            for (int i = 0; i < recordsToCreate; i++)
            {
                var record = fakerPhoneRecord.Generate();
                await PhoneBookWithLinkedList.AppendAsync(fileLocation, record.Name, record.Number);
            }

            // Act
            var list = await PhoneBookWithLinkedList.GetListAsync(fileLocation, 0, recordsToCreate);

            // Assert
            list.Should()
            .NotBeNull()
            .And
            .HaveCount(recordsToCreate);
        }
        public async Task PhoneBook_SerializerCanHandleDeepNest()
        {
            // Arrange
            var recordsToCreate = 64; // by default, it will detect a cyclicle reference and throw

            for (int i = 0; i < recordsToCreate; i++)
            {
                var record = fakerPhoneRecord.Generate();
                await PhoneBookWithLinkedList.AppendAsync(fileLocation, record.Name, record.Number);
            }

            // Act
            var list = await PhoneBookWithLinkedList.GetListAsync(fileLocation, 0, recordsToCreate);

            // Assert
            list.Should()
            .NotBeNull()
            .And
            .HaveCount(recordsToCreate);
        }
        [InlineData(1, 2, 1, 1)]    // returns take when skip exceeds count
        public async Task PhoneBookFile_SkipAndTake(
            int recordsToCreate,
            int skip,
            int take,
            int expectedCount)
        {
            // Arrange
            for (int i = 0; i < recordsToCreate; i++)
            {
                var record = fakerPhoneRecord.Generate();
                await PhoneBookWithLinkedList.AppendAsync(fileLocation, record.Name, record.Number);
            }

            // Act
            var list = await PhoneBookWithLinkedList.GetListAsync(fileLocation, skip, take);

            // Assert
            list.ToList().Distinct()
            .Should()
            .HaveCount(expectedCount);
        }