You've already forked linux-packaging-mono
Imported Upstream version 5.8.0.22
Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
parent
5f4a27cc8a
commit
7d05485754
8
external/corefx/src/System.Composition.AttributedModel/tests/Configurations.props
vendored
Normal file
8
external/corefx/src/System.Composition.AttributedModel/tests/Configurations.props
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<BuildConfigurations>
|
||||
netstandard;
|
||||
</BuildConfigurations>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
49
external/corefx/src/System.Composition.AttributedModel/tests/ExportAttributeTests.cs
vendored
Normal file
49
external/corefx/src/System.Composition.AttributedModel/tests/ExportAttributeTests.cs
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class ExportAttributeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Ctor_Default()
|
||||
{
|
||||
var attribute = new ExportAttribute();
|
||||
Assert.Null(attribute.ContractName);
|
||||
Assert.Null(attribute.ContractType);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("ContractName")]
|
||||
public void Ctor_ContractName(string contractName)
|
||||
{
|
||||
var attribute = new ExportAttribute(contractName);
|
||||
Assert.Equal(contractName, attribute.ContractName);
|
||||
Assert.Null(attribute.ContractType);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData(typeof(string))]
|
||||
public void Ctor_ContractName(Type contractType)
|
||||
{
|
||||
var attribute = new ExportAttribute(contractType);
|
||||
Assert.Null(attribute.ContractName);
|
||||
Assert.Equal(contractType, attribute.ContractType);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null, null)]
|
||||
[InlineData("ContractName", typeof(string))]
|
||||
public void Ctor_ContractName_ContractType(string contractName, Type contractType)
|
||||
{
|
||||
var attribute = new ExportAttribute(contractName, contractType);
|
||||
Assert.Equal(contractName, attribute.ContractName);
|
||||
Assert.Equal(contractType, attribute.ContractType);
|
||||
}
|
||||
}
|
||||
}
|
||||
21
external/corefx/src/System.Composition.AttributedModel/tests/ExportMetadataAttributeTests.cs
vendored
Normal file
21
external/corefx/src/System.Composition.AttributedModel/tests/ExportMetadataAttributeTests.cs
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class ExportMetadataAttributeTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(null, null)]
|
||||
[InlineData("Name", "Value")]
|
||||
public void Ctor_Name_Value(string name, string value)
|
||||
{
|
||||
var attribute = new ExportMetadataAttribute(name, value);
|
||||
Assert.Equal(name ?? string.Empty, attribute.Name);
|
||||
Assert.Equal(value, attribute.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
27
external/corefx/src/System.Composition.AttributedModel/tests/ImportAttributeTests.cs
vendored
Normal file
27
external/corefx/src/System.Composition.AttributedModel/tests/ImportAttributeTests.cs
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class ImportAttributeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Ctor_Default()
|
||||
{
|
||||
var attribute = new ImportAttribute();
|
||||
Assert.Null(attribute.ContractName);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("ContractName")]
|
||||
public void Ctor_ContractName(string contractName)
|
||||
{
|
||||
var attribute = new ImportAttribute(contractName);
|
||||
Assert.Equal(contractName, attribute.ContractName);
|
||||
}
|
||||
}
|
||||
}
|
||||
27
external/corefx/src/System.Composition.AttributedModel/tests/ImportManyAttributeTests.cs
vendored
Normal file
27
external/corefx/src/System.Composition.AttributedModel/tests/ImportManyAttributeTests.cs
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class ImportManyAttributeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Ctor_Default()
|
||||
{
|
||||
var attribute = new ImportManyAttribute();
|
||||
Assert.Null(attribute.ContractName);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("ContractName")]
|
||||
public void Ctor_ContractName(string contractName)
|
||||
{
|
||||
var attribute = new ImportManyAttribute(contractName);
|
||||
Assert.Equal(contractName, attribute.ContractName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class ImportMetadataConstraintAttributeTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(null, null)]
|
||||
[InlineData("Name", "Value")]
|
||||
public void Ctor_Name_Value(string name, string value)
|
||||
{
|
||||
var attribute = new ImportMetadataConstraintAttribute(name, value);
|
||||
Assert.Equal(name, attribute.Name);
|
||||
Assert.Equal(value, attribute.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class ImportingConstructorAttributeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Ctor_Default()
|
||||
{
|
||||
var attribute = new ImportingConstructorAttribute();
|
||||
Assert.Equal(typeof(ImportingConstructorAttribute), attribute.TypeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
18
external/corefx/src/System.Composition.AttributedModel/tests/MetadataAttributeAttributeTests.cs
vendored
Normal file
18
external/corefx/src/System.Composition.AttributedModel/tests/MetadataAttributeAttributeTests.cs
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class MetadataAttributeAttributeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Ctor_Default()
|
||||
{
|
||||
var attribute = new MetadataAttributeAttribute();
|
||||
Assert.Equal(typeof(MetadataAttributeAttribute), attribute.TypeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
27
external/corefx/src/System.Composition.AttributedModel/tests/PartMetadataAttributeTests.cs
vendored
Normal file
27
external/corefx/src/System.Composition.AttributedModel/tests/PartMetadataAttributeTests.cs
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class PartMetadataAttributeTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("", null)]
|
||||
[InlineData("Name", "Value")]
|
||||
public void Ctor_Name_Value(string name, string value)
|
||||
{
|
||||
var attribute = new PartMetadataAttribute(name, value);
|
||||
Assert.Equal(name, attribute.Name);
|
||||
Assert.Equal(value, attribute.Value);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ctor_NullName_ThrowsArgumentNullException()
|
||||
{
|
||||
AssertExtensions.Throws<ArgumentNullException>("name", () => new PartMetadataAttribute(null, "value"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class PartNotDiscoverableAttributeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Ctor_Default()
|
||||
{
|
||||
var attribute = new PartNotDiscoverableAttribute();
|
||||
Assert.Equal(typeof(PartNotDiscoverableAttribute), attribute.TypeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
31
external/corefx/src/System.Composition.AttributedModel/tests/SharedAttributeTests.cs
vendored
Normal file
31
external/corefx/src/System.Composition.AttributedModel/tests/SharedAttributeTests.cs
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class SharedAttributeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Ctor_Default()
|
||||
{
|
||||
var attribute = new SharedAttribute();
|
||||
Assert.Null(attribute.SharingBoundary);
|
||||
Assert.Equal("SharingBoundary", attribute.Name);
|
||||
Assert.Null(attribute.Value);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("Name")]
|
||||
public void Ctor_SharingBoundaryName(string sharingBoundaryName)
|
||||
{
|
||||
var attribute = new SharedAttribute(sharingBoundaryName);
|
||||
Assert.Equal(sharingBoundaryName, attribute.SharingBoundary);
|
||||
Assert.Equal("SharingBoundary", attribute.Name);
|
||||
Assert.Equal(sharingBoundaryName, attribute.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
33
external/corefx/src/System.Composition.AttributedModel/tests/SharingBoundaryAttributeTests.cs
vendored
Normal file
33
external/corefx/src/System.Composition.AttributedModel/tests/SharingBoundaryAttributeTests.cs
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
|
||||
namespace System.Composition.Tests
|
||||
{
|
||||
public class SharingBoundaryAttributeTests
|
||||
{
|
||||
public static IEnumerable<object[]> SharingBoundaryNames_TestData()
|
||||
{
|
||||
yield return new object[] { new string[0] };
|
||||
yield return new object[] { new string[] { "1", null, "2" } };
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(SharingBoundaryNames_TestData))]
|
||||
public void Ctor_SharingBoundaryNames(string[] sharingBoundaryNames)
|
||||
{
|
||||
var attribute = new SharingBoundaryAttribute(sharingBoundaryNames);
|
||||
Assert.Equal(sharingBoundaryNames, attribute.SharingBoundaryNames);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ctor_NullSharingBoundaryNames_ThrowsArgumentNullException()
|
||||
{
|
||||
AssertExtensions.Throws<ArgumentNullException>("sharingBoundaryNames", () => new SharingBoundaryAttribute(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{853BB14F-8A5B-42B4-A053-21DE1AEBB335}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Release|AnyCPU'" />
|
||||
<ItemGroup>
|
||||
<Compile Include="SharingBoundaryAttributeTests.cs" />
|
||||
<Compile Include="SharedAttributeTests.cs" />
|
||||
<Compile Include="PartNotDiscoverableAttributeTests.cs" />
|
||||
<Compile Include="PartMetadataAttributeTests.cs" />
|
||||
<Compile Include="MetadataAttributeAttributeTests.cs" />
|
||||
<Compile Include="ImportMetadataConstraintAttributeTests.cs" />
|
||||
<Compile Include="ImportManyAttributeTests.cs" />
|
||||
<Compile Include="ImportingConstructorAttributeTests.cs" />
|
||||
<Compile Include="ImportAttributeTests.cs" />
|
||||
<Compile Include="ExportMetadataAttributeTests.cs" />
|
||||
<Compile Include="ExportAttributeTests.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
Reference in New Issue
Block a user