Skip to content

Commit ecadf25

Browse files
authored
refactor: avoid InternalsVisibleTo (#1217)
Remove tests that only verify internal behavior and get rid of `InternalsVisibleTo` except for `DynamicProxyGenAssembly2`.
1 parent 43ce42d commit ecadf25

20 files changed

+49
-261
lines changed

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<Copyright>Copyright © Tatham Oddie &amp; friends 2010-$([System.DateTime]::Now.ToString('yyyy'))</Copyright>
55
<Authors>Tatham Oddie &amp; friends</Authors>
66
<SignAssembly Condition="'$(Configuration)' == 'Release'">True</SignAssembly>
7+
<PublicKey>00240000048000009400000006020000002400005253413100040000010001001160c7a0f907c400c5392975b66d2f3752fb82625d5674d386b83896d4d4ae8d0ef8319ef391fbb3466de0058ad2f361b8f5cb8a32ecb4e908bece5c519387552cedd2ca0250e36b59c6d6dc3dc260ca73a7e27c3add4ae22d5abaa562225d7ba34d427e8f3f52928a46a674deb0208eca7d379aa22712355b91a55a5ce521d2</PublicKey>
78
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)StrongName.snk</AssemblyOriginatorKeyFile>
89
<LangVersion>latest</LangVersion>
910
<PackageTags>testing</PackageTags>

src/TestableIO.System.IO.Abstractions.TestingHelpers/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/TestableIO.System.IO.Abstractions.Wrappers/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@
1313
<PackageReference Include="Testably.Abstractions.FileSystem.Interface"/>
1414
</ItemGroup>
1515

16+
<ItemGroup>
17+
<AssemblyAttribute Include="System.CLSCompliantAttribute">
18+
<_Parameter1>true</_Parameter1>
19+
</AssemblyAttribute>
20+
</ItemGroup>
21+
22+
<ItemGroup>
23+
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" PublicKey="0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7"/>
24+
</ItemGroup>
25+
1626
</Project>

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net472.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/TestableIO/System.IO.Abstractions.git")]
2-
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.IO.Abstractions.TestingHelpers.Tests")]
32
[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName=".NET Framework 4.7.2")]
43
namespace System.IO.Abstractions.TestingHelpers
54
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net6.0.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/TestableIO/System.IO.Abstractions.git")]
2-
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.IO.Abstractions.TestingHelpers.Tests")]
32
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName=".NET 6.0")]
43
namespace System.IO.Abstractions.TestingHelpers
54
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net8.0.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/TestableIO/System.IO.Abstractions.git")]
2-
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.IO.Abstractions.TestingHelpers.Tests")]
32
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")]
43
namespace System.IO.Abstractions.TestingHelpers
54
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net9.0.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/TestableIO/System.IO.Abstractions.git")]
2-
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.IO.Abstractions.TestingHelpers.Tests")]
32
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v9.0", FrameworkDisplayName=".NET 9.0")]
43
namespace System.IO.Abstractions.TestingHelpers
54
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_netstandard2.0.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/TestableIO/System.IO.Abstractions.git")]
2-
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.IO.Abstractions.TestingHelpers.Tests")]
32
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName=".NET Standard 2.0")]
43
namespace System.IO.Abstractions.TestingHelpers
54
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_netstandard2.1.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/TestableIO/System.IO.Abstractions.git")]
2-
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.IO.Abstractions.TestingHelpers.Tests")]
32
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName=".NET Standard 2.1")]
43
namespace System.IO.Abstractions.TestingHelpers
54
{

0 commit comments

Comments
 (0)