Package com.eviware.soapui.model.project

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


                return false;
            }

            try {
                soapUICore.saveSettings();
                SaveStatus saveStatus = workspace.onClose();
                if (saveStatus == SaveStatus.CANCELLED || saveStatus == SaveStatus.FAILED) {
                    return false;
                }
            } catch (Exception e1) {
                SoapUI.logError(e1);
View Full Code Here


        if (shouldCreateBackup(projectFile)) {
            createBackup(projectFile);
        }


        SaveStatus saveStatus = saveIn(projectFile);

        if (saveStatus == SaveStatus.SUCCESS) {
            path = projectFile.getAbsolutePath();
        }
View Full Code Here

            return SaveStatus.FAILED;
        }

        String oldPath = path;
        path = fileName;
        SaveStatus result = save(); // if remote is true this won't save the file
        if (result == SaveStatus.SUCCESS) {
            remote = false;
        } else {
            path = oldPath;
        }
View Full Code Here

    @Test
    public void projectLoadedFromInputStreamCanBeSaved() throws IOException {
        Project project = new WsdlProject(sampleProjectInputSteam, null);
        answerYesWhenTheOverwriteDialogIsShown();
        SaveStatus status = project.save();
        assertThat(status, is(SaveStatus.SUCCESS));
    }
View Full Code Here

    }

    @Test
    public void projectLoadedFromFileCanBeSaved() throws IOException {
        Project project = new WsdlProject(SAMPLE_PROJECT_ABSOLUTE_PATH, (WorkspaceImpl) null);
        SaveStatus status = project.save();
        assertThat(status, is(SaveStatus.SUCCESS));
    }
View Full Code Here

    }

    @Test
    public void newlyCreatedProjectCanBeSaved() throws XmlException, IOException, SoapUIException {
        WsdlProject project = createTemporaryProject();
        SaveStatus status = project.saveIn(createTemporaryProjectFile());
        assertThat(status, is(SaveStatus.SUCCESS));
    }
View Full Code Here

    @Test
    public void newlyCreatedProjectIsNotSavedIfUserOptsNotToSave() throws XmlException, IOException, SoapUIException {
        Project project = createTemporaryProject();
        cancelWhenTheSaveAsFileDialogIsShown();
        SaveStatus status = project.save();
        assertThat(status, is(not(SaveStatus.SUCCESS)));
    }
View Full Code Here

    @Test
    public void projectIsNotSavedIfSaveAsDialogIsCancelled() throws IOException {
        Project project = new WsdlProject(sampleProjectInputSteam, null);
        answerYesWhenTheOverwriteDialogIsShown();
        cancelWhenTheSaveAsFileDialogIsShown();
        SaveStatus status = project.save();
        assertThat(status, is(SaveStatus.CANCELLED));
    }
View Full Code Here

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

    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

TOP

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

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.