public void SkipsNonReferenceAssembly()
        {
            var resolver = new ReferenceAssemblyPathResolver();
            var library  = F.Create(
                F.PackageType);

            var result = resolver.TryResolveAssemblyPaths(library, null);

            result.Should().BeFalse();
        }
        public void ChecksForFileNameInFallbackLocation()
        {
            var fileSystem = FileSystemMockBuilder.Create()
                             .AddFiles(ReferencePath, F.DefaultAssembly)
                             .Build();

            var library    = F.Create(libraryType: F.ReferenceAssemblyType);
            var assemblies = new List <string>();

            var resolver = new ReferenceAssemblyPathResolver(fileSystem, null, new string[] { ReferencePath });
            var result   = resolver.TryResolveAssemblyPaths(library, assemblies);

            result.Should().BeTrue();
            assemblies.Should().Contain(Path.Combine(ReferencePath, F.DefaultAssembly));
        }
        public void ShouldResolveAll()
        {
            var fileSystem = FileSystemMockBuilder.Create()
                             .AddFiles(ReferencePath, F.DefaultAssembly)
                             .Build();

            var library    = F.Create(libraryType: F.ReferenceAssemblyType, assemblies: F.TwoAssemblies);
            var assemblies = new List <string>();

            var resolver = new ReferenceAssemblyPathResolver(fileSystem, null, new string[] { ReferencePath });

            var exception = Assert.Throws <InvalidOperationException>(() => resolver.TryResolveAssemblyPaths(library, assemblies));

            exception.Message.Should()
            .Contain(F.SecondAssemblyPath)
            .And.Contain(library.Name);
        }