Package com.eviware.soapui.model.project

Examples of com.eviware.soapui.model.project.Project


    }

    @Test
    public void existingFileIsCancelledIfNotWritableAndNoNewFileSelected() throws IOException {
        setFileWritePermission(SAMPLE_PROJECT_ABSOLUTE_PATH, false);
        Project project = new WsdlProject(SAMPLE_PROJECT_ABSOLUTE_PATH, (WorkspaceImpl) null);
        answerYesWhenTheDoYouWantToWriteToNewFileDialogIsShown();
        cancelWhenTheSaveAsFileDialogIsShown();
        SaveStatus status = project.save();
        assertThat(status, is(SaveStatus.CANCELLED));
    }
View Full Code Here


public class SoapUITreeNodeRenderer extends DefaultTreeCellRenderer {
    public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded,
                                                  boolean leaf, int row, boolean hasFocus) {
        ModelItem modelItem = ((SoapUITreeNode) value).getModelItem();
        if (modelItem instanceof Project) {
            Project project = (Project) modelItem;
            if (!project.isOpen() && !project.isDisabled()) {
                leaf = false;
                expanded = false;
            }
        }
View Full Code Here

    @Test
    public void shouldBeConstructedWithRestMockServices() {
        RestMockService restMockService = mock(RestMockService.class);
        when(restMockService.getPropertyNames()).thenReturn(new String[]{});

        Project project = mock(Project.class);
        when(project.getRestMockServiceCount()).thenReturn(1);
        when(project.getRestMockServiceAt(0)).thenReturn(restMockService);
        when(project.isOpen()).thenReturn(true);
        when(project.getPropertyNames()).thenReturn(new String[]{});

        WorkspaceTreeNode workspaceNode = mock(WorkspaceTreeNode.class);
        SoapUITreeModel soapUITreeModel = mock(SoapUITreeModel.class);
        when(workspaceNode.getTreeModel()).thenReturn(soapUITreeModel);
View Full Code Here

        return Collections.EMPTY_LIST;
    }

    @Override
    public Project getProject() {
        Project project = ModelSupport.getModelItemProject(this);
        if (project == null) {
            throw new UnsupportedOperationException(this + " is not associated with a project");
        }
        return project;
    }
View Full Code Here

        }

        fireWorkspaceSwitching();

        while (projectList.size() > 0) {
            Project project = projectList.remove(0);
            try {
                fireProjectRemoved(project);
            } finally {
                project.release();
            }
        }

        try {
            String oldName = getName();
View Full Code Here

    }

    private void mockWorkspaceProjects(String... projectNames) {
        List projectList = new ArrayList<Project>();
        for (String projectName : projectNames) {
            Project project = Mockito.mock(Project.class);
            when(project.getName()).thenReturn(projectName);
            projectList.add(project);
        }
        when(workspace.getProjectList()).thenReturn(projectList);
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public TestStepConfig createNewTestStep(WsdlTestCase testCase, String name) {
        // build list of available interfaces / restResources
        Project project = testCase.getTestSuite().getProject();
        List<String> options = new ArrayList<String>();
        TupleList<RestMethod, RestRequest> restMethods = new TupleList<RestMethod, RestRequest>();

        for (int c = 0; c < project.getInterfaceCount(); c++) {
            Interface iface = project.getInterfaceAt(c);
            if (iface instanceof RestService) {
                List<RestResource> resources = ((RestService) iface).getAllResources();

                for (RestResource resource : resources) {
                    // options.add( iface.getName() + " -> " + resource.getPath() );
View Full Code Here

        if (parameters != null && parameters.length == 1) {
            String projectFilePath = parameters[0];

            try {
                Workspace workspace = SoapUI.getWorkspace();
                Project project = findProject(projectFilePath, workspace);

                project = openProject(projectFilePath, workspace, project);

                showModelItem(project);
                bringToFront();
View Full Code Here

        String testSuiteName = parameters[1];
        String testCaseName = parameters[2];

        try {
            Workspace workspace = SoapUI.getWorkspace();
            Project project = findProject(projectFilePath, workspace);

            project = openProject(projectFilePath, workspace, project);

            TestSuite testSuite = project.getTestSuiteByName(testSuiteName);
            TestCase testCase = testSuite.getTestCaseByName(testCaseName);

            showModelItem(testCase);
            bringToFront();
        } catch (Exception e) {
View Full Code Here

            UISupport.selectAndShow(modelItem);
        }
    }

    private Project findProject(String projectFile, Workspace workspace) {
        Project project = null;
        List<? extends Project> projectList = workspace.getProjectList();
        for (Project proj : projectList) {
            if (proj.getPath().equalsIgnoreCase(projectFile)) {
                project = workspace.getProjectByName(proj.getName());
                break;
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.project.Project

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.