use of Our.Umbraco.Community.Tests and the related Umbraco.Tests.dll when unit testing, results in the “Culture and Hostnames” missing as a menu Item in Umbraco contextmenu.
As described at that locaton:
When checking the permissions for a user the users default-permissions are fetched from the database as a string of chars; E.g. the admin users default-permissions are: CADMOSKTPIURZ:5F7
Each letter will allow certain actions(IActions) to be allowed by the user.
The problem occurred because we had deployed the "Umbraco.Tests.dll" to the environment, which contained an IAction with the same permission-letter as the AssignDomain action ("ActionAssignDomain.cs"). This caused the "Cultures and Hostnames" menu-item to be removed from the resulting menu-item list.
My question is this: given all of the above how exactly should I then resolve this issue (without removing Umbraco.Tests) . I need to modify “Culture and Hostnames”.
I started trying to put by tests in a separate project but found I had so many dependencies on the web application that I needed to run it as part of that project to get my tests to run. They all run very nicely now - it seems to be a pity to force such a constraint.
So, I assume you are saying that that is bad practice and I should revert to trying to separate tests into a different project. OK that will take some time and I am not sure if it is going to be possible so please confirm if my understanding is correct before I proceed and try and do that.
I always put my tests in a seperate project. Rule of thumb is one test project per VS project. Some times I even have 2 test projects per VS project to split up my unit and integration tests.
I also never write any code, except for views in my web project. Only in my own class libraries.
So I haven't faced the issue you are having.
Our.Umbraco.Community.Tests causes missing “Culture and Hostnames” menu Item in Umbraco contextmenu
Dear Umbraco Folk,
As detailed at :
https://stackoverflow.com/questions/29756510/missing-culture-and-hostnames-menuitem-in-umbraco-contextmenu/29756511#29756511
use of Our.Umbraco.Community.Tests and the related Umbraco.Tests.dll when unit testing, results in the “Culture and Hostnames” missing as a menu Item in Umbraco contextmenu.
As described at that locaton:
My question is this: given all of the above how exactly should I then resolve this issue (without removing Umbraco.Tests) . I need to modify “Culture and Hostnames”.
Thanks
Terry Clancy
ClanceZ
Hi Terry,
These dll are only meant for being used in your test project. They should not be in the bin folder of your web application.
Dave
Dave,
Thank you for your response.
I started trying to put by tests in a separate project but found I had so many dependencies on the web application that I needed to run it as part of that project to get my tests to run. They all run very nicely now - it seems to be a pity to force such a constraint.
So, I assume you are saying that that is bad practice and I should revert to trying to separate tests into a different project. OK that will take some time and I am not sure if it is going to be possible so please confirm if my understanding is correct before I proceed and try and do that.
Terry Clancy ClanceZ
Hi Terry,
I always put my tests in a seperate project. Rule of thumb is one test project per VS project. Some times I even have 2 test projects per VS project to split up my unit and integration tests.
I also never write any code, except for views in my web project. Only in my own class libraries. So I haven't faced the issue you are having.
Dave
is working on a reply...