public void Read_ThrowException_DirectoryIsNotSet()
        {
            //setup
            TestPackageHelper.CleanPackagesDefaultDirectory(PackagesFileHelper.GetDefaultPackagesFolderFullPath());
            var storageOptions            = new PackagesFileStorageOptions();
            var packageFileStorageService = new PackageFileStorageService(storageOptions, It.IsAny <IMapper>());

            // act + assert
            Assert.Throws <DirectoryNotFoundException>(() =>
                                                       packageFileStorageService.Read());
        }
        public async Task Read_ReturnsGetOSVersionPackage()
        {
            //setup
            TestPackageHelper.CleanPackagesDefaultDirectory(PackagesFileHelper.GetDefaultPackagesFolderFullPath());

            // Act
            var packages = _packageFileStorageService.Read();

            // Assert 1
            Assert.False(packages.Any());

            // save package file
            var newPackage = await SaveTestPackageFile();

            // Assert 2
            Assert.NotNull(newPackage);

            packages = _packageFileStorageService.Read();

            Assert.True(packages.Any());
            Assert.Equal(packages.Single().Id, TestPackageHelper.GetOSVersionPackageId, StringComparer.OrdinalIgnoreCase);
            Assert.NotNull(packages.Single().PackageDependencies);
            Assert.True(packages.Single().PackageDependencies.Any());
        }