[Neo Plugins UT] Fix namespace for adding plugin ut tests#3286
[Neo Plugins UT] Fix namespace for adding plugin ut tests#3286shargon merged 5 commits intoneo-project:masterfrom
Conversation
|
@Jim8y any obsolete call that we can remove it? now that the public method will change it's a good time to clean it |
|
@shargon do as you wish. |
| <ItemGroup> | ||
| <InternalsVisibleTo Include="Neo.SmartContract.Testing" /> | ||
| <InternalsVisibleTo Include="Neo.SmartContract.TestEngine" /> | ||
| <InternalsVisibleTo Include="Neo.Plugins.RpcServer.Tests" /> |
There was a problem hiding this comment.
Why just RpcServer here?
There was a problem hiding this comment.
adding ut for these plugin will be a very huge task, now i can only focus on rpcserver. whoever want to work on other plugin can add by urself.
There was a problem hiding this comment.
I mean, why not include [Neo.Plugins.OracleService.Tests](https://github.com/neo-project/neo/tree/master/tests/Neo.Plugins.OracleService.Tests) and Neo.Plugins.Storage.Tests
What was this need?
| } | ||
|
|
||
| RpcServer server = new(system, s); | ||
| RpcServer rpcRpcServer = new(system, s); |
vncoelho
left a comment
There was a problem hiding this comment.
The changes looks good. You could had wait more for merging. There are changes on the organization of files and classes, in particular, consensus.
Description
The namespace in the neo plugin is very confusing and conflicts with the class name, so we need to sort out the namespace.
For Instance,
it is Neo.Plugins; for some plugin,
ApplicationLogs.Store; for some plugin,
Neo.Consensus for some plugin.
Now all change to Neo.Plugins.XXXX;
The issue that makes me have to make this change is the namespace of RpcServer is
Neo.Plugins;, while it has a class ofRpcServer, which is exactly the name of the plugin. If i want to add UT test for it, it conflics with the UT namespace asNeo.Plugins.RpcServer.Tests;, the namespace of the UT makes it impossible to get access to the RpcServer class.Fixes # Closes #3287
Type of change
How Has This Been Tested?
To demonstrate the change, i have added the UT moq that i will be using to test the rpcserver. More tests will be added in other prs.
Test Configuration:
Checklist: