Examples of prompt()


Examples of org.apache.batik.script.Window.prompt()

            return Context.toObject("", thisObj);

        case 1:
            String message =
                (String)Context.toType(args[0], String.class);
            return Context.toObject(window.prompt(message), thisObj);

        default:
            message =
                (String)Context.toType(args[0], String.class);
            String defVal =
View Full Code Here

Examples of org.apache.batik.script.Window.prompt()

        default:
            message =
                (String)Context.toType(args[0], String.class);
            String defVal =
                (String)Context.toType(args[1], String.class);
            return Context.toObject(window.prompt(message, defVal), thisObj);
        }
    }

    /**
     * To wrap a function in an handler.
View Full Code Here

Examples of org.apache.flex.forks.batik.script.Window.prompt()

            return Context.toObject("", thisObj);

        case 1:
            String message =
                (String)Context.toType(args[0], String.class);
            return Context.toObject(window.prompt(message), thisObj);

        default:
            message =
                (String)Context.toType(args[0], String.class);
            String defVal =
View Full Code Here

Examples of org.codehaus.plexus.components.interactivity.Prompter.prompt()

    public void testInputVariablesInteractive()
        throws Exception
    {
        // prepare
        Prompter mockPrompter = mock( Prompter.class );
        when( mockPrompter.prompt( isA( String.class ), eq( "artifactId-1.0" ) ) ).thenReturn( "tag-value", "simulated-tag-value" );
        phase.setPrompter( mockPrompter );

        List<MavenProject> reactorProjects = Collections.singletonList( createProject( "artifactId", "1.0" ) );

        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
View Full Code Here

Examples of org.codehaus.plexus.components.interactivity.Prompter.prompt()

    public void testPrompterException()
        throws Exception
    {
        // prepare
        Prompter mockPrompter = mock( Prompter.class );
        when( mockPrompter.prompt( isA( String.class ), isA( String.class ) ) ).thenThrow( new PrompterException( "..." ) );
        phase.setPrompter( mockPrompter );

        List<MavenProject> reactorProjects = Collections.singletonList( createProject( "artifactId", "1.0" ) );

        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
View Full Code Here

Examples of org.codehaus.plexus.components.interactivity.Prompter.prompt()

        ReleaseDescriptor releaseDescriptor = new ReleaseDescriptor();
        List<MavenProject> reactorProjects = createDescriptorFromProjects( "snapshot-release-plugin" );

        Prompter mockPrompter = mock( Prompter.class );
        when( mockPrompter.prompt( anyString(), eq( YES_NO_ARRAY ), eq( NO ) ) ).thenThrow( new PrompterException(
            "..." ) );
        phase.setPrompter( mockPrompter );

        try
        {
View Full Code Here

Examples of org.codehaus.plexus.components.interactivity.Prompter.prompt()

        {
            assertEquals( "Check cause", PrompterException.class, e.getCause().getClass() );
        }

        mockPrompter = mock( Prompter.class );
        when( mockPrompter.prompt( anyString(), eq( YES_NO_ARRAY ), eq( NO ) ) ).thenThrow( new PrompterException(
            "..." ) );

        try
        {
            phase.simulate( releaseDescriptor, new DefaultReleaseEnvironment(), reactorProjects );
View Full Code Here

Examples of org.codehaus.plexus.components.interactivity.Prompter.prompt()

    private Prompter createYesNoMockPrompter( boolean yes )
        throws PrompterException
    {
        Prompter mockPrompter = mock( Prompter.class );

        when( mockPrompter.prompt( anyString(), eq( YES_NO_ARRAY ), eq( NO ) ) ).thenReturn( yes ? YES : NO );

        return mockPrompter;
    }

    private Prompter createMockPrompterWithSnapshotReleasePlugin( String useSnapshotReleasePlugin,
View Full Code Here

Examples of org.codehaus.plexus.components.interactivity.Prompter.prompt()

                                                                  String resolveSnapshots )
        throws PrompterException
    {
        Prompter mockPrompter = mock( Prompter.class );

        when( mockPrompter.prompt( anyString(), eq( YES_NO_ARRAY ), eq( NO ) ) ).thenReturn( useSnapshotReleasePlugin );
        when( mockPrompter.prompt( anyString(), eq( YES_NO_ARRAY ), eq( NO ) ) ).thenReturn( resolveSnapshots );

        return mockPrompter;
    }
View Full Code Here

Examples of org.codehaus.plexus.components.interactivity.Prompter.prompt()

        throws PrompterException
    {
        Prompter mockPrompter = mock( Prompter.class );

        when( mockPrompter.prompt( anyString(), eq( YES_NO_ARRAY ), eq( NO ) ) ).thenReturn( useSnapshotReleasePlugin );
        when( mockPrompter.prompt( anyString(), eq( YES_NO_ARRAY ), eq( NO ) ) ).thenReturn( resolveSnapshots );

        return mockPrompter;
    }

    private Prompter createMockPrompter( String resolveSnapshots, String resolutionType, VersionPair resolvedVersions )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.