Home > front end >  Nunit Test. Visual Studio. Namespace , class issue
Nunit Test. Visual Studio. Namespace , class issue

Time:11-18

.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

CodePudding user response:

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
    }
}
  • Related