You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Markus Weimer (JIRA)" <ji...@apache.org> on 2015/07/01 20:07:04 UTC
[jira] [Created] (REEF-436) Allow the tests projects access to
internal APIs
Markus Weimer created REEF-436:
----------------------------------
Summary: Allow the tests projects access to internal APIs
Key: REEF-436
URL: https://issues.apache.org/jira/browse/REEF-436
Project: REEF
Issue Type: Improvement
Components: REEF.NET
Reporter: Markus Weimer
REEF.NET has an enormous surface of {{public}} methods. The main reason for that seems to be testing.
*Background:* In .NET, tests live in a separate project (assembly). And APIs need to be `public` to be accessible from other assemblies.
Hence, we make things {{public}} for the sake of testing which should never be called by application code. This is not sustainable with our promise of not breaking compatibility between releases.
However, there is a way to allow the test project access to APIs marked as {{internal}}. To do so, we have to [add one line|https://msdn.microsoft.com/en-us/library/vstudio/system.runtime.compilerservices.internalsvisibletoattribute%28v=vs.110%29.aspx] to the {{AssemblyInfo.cs}} of the projects that is tested:
{code}
[assembly:InternalsVisibleTo("THE_NAME_OF_THE_TEST_DLL")]
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)