Exemplo n.º 1
0
        public void Should_Return_Empty_Result_If_Any_Match_Is_Not_Possible()
        {
            // Given
            var fixture = new NuGetV3ContentResolverFixture(".NETStandard,Version=v1.6");

            fixture.CreateCLRAssembly("/Working/lib/net45/file.dll");
            fixture.CreateCLRAssembly("/Working/lib/net451/file.dll");
            fixture.CreateCLRAssembly("/Working/lib/net452/file.dll");
            fixture.CreateCLRAssembly("/Working/lib/net461/file.dll");

            // When
            var result = fixture.GetFiles();

            // Then
            Assert.Equal(0, result.Count);
        }
Exemplo n.º 2
0
        public void Should_Return_Nearest_Compatible_Framework_If_An_Exact_Match_Is_Not_Possible()
        {
            // Given
            var fixture = new NuGetV3ContentResolverFixture(".NETStandard,Version=v1.6");

            fixture.CreateCLRAssembly("/Working/lib/net45/file.dll");
            fixture.CreateCLRAssembly("/Working/lib/net451/file.dll");
            fixture.CreateCLRAssembly("/Working/lib/net452/file.dll");
            fixture.CreateCLRAssembly("/Working/lib/net461/file.dll");
            fixture.CreateCLRAssembly("/Working/lib/netstandard1.5/file.dll");

            // When
            var result = fixture.GetFiles();

            // Then
            Assert.Equal(1, result.Count);
            Assert.Equal("/Working/lib/netstandard1.5/file.dll", result.ElementAt(0).Path.FullPath);
        }
Exemplo n.º 3
0
        public void Should_Return_Only_CLR_Assemblies()
        {
            // Given
            var fixture = new NuGetV3ContentResolverFixture(".NETStandard,Version=v1.6");

            fixture.CreateCLRAssembly("/Working/lib/netstandard1.6/file.dll");
            fixture.CreateNonCLRAssembly("/Working/lib/netstandard1.6/lib/native.dll");

            // When
            var result = fixture.GetFiles();

            // Then
            Assert.Equal(1, result.Count);
            Assert.Equal("/Working/lib/netstandard1.6/file.dll", result.ElementAt(0).Path.FullPath);
        }