How to hard code project name ?

Hi,

Can anyone explain how to hard code a project name as

Project projectname = "unit_test_project";

I was writing a test like

Project[] openProjects= (ProjectManager.getInstance().getOpenProjects());

foreach project in openProjects{

          foreach solution in project{
      
          string outputpath= SmoduleOperations.getOutputPathFor(solution.getModels().iterator().next());
   
           // some comparison and tests are done here using this outputpath

   }

}


The above code works fine inside MPS.

When you run this test using ant from terminal, it is printing the openprojects as some temporary project name (mpstmp12) and not the project in which my test is present.

Since the very first line has wrong value, the test is wrong. So instead of getting openProjects, I am trying to hard code the project name or its path.

So can anyone help me regarding this??

Thanks in advance.

Please sign in to leave a comment.