Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Nunit Test. Visual Studio. Namespace , class issue

.I m very new to programming, and I think I’m loosing my mind trying to understand what’s the problem here. Does Anyone have any suggestions?

The Test Project has Reference set to OrderManagementSystem.Domain and OrderManagementSystem.Controllers.
The Controllers Class is Public .
Im able to access Classes from Domain Namespace , but not Controllers??
What did i do wrong?

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

This error is because your class name is Controllers and namespace also contains .Controllers.

Either update the name of class or remove .Controllers from the namespace OrderManagementSystem.Controllers

In Controllers.cs file,

using Systems;
....

//Remove .Controllers from namespace
namespace OrderManagementSystems
{
    public class Controllers
    {
          //Your code
    }
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading