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/02 20:25:05 UTC
[jira] [Assigned] (REEF-436) Allow the tests projects access to
internal APIs
[ https://issues.apache.org/jira/browse/REEF-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Markus Weimer reassigned REEF-436:
----------------------------------
Assignee: Markus Weimer
I just verified that this works as part of adding a new project with tests in [REEF-427]. I'll make a pull request to change the other projects after lunch.
> 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
> Assignee: 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)