Package com.netflix.genie.common.model

Examples of com.netflix.genie.common.model.Application


    @Test
    public void testSetApplicationForCommand() throws GenieException {
        final Command command2 = this.service.getCommand(COMMAND_2_ID);
        Assert.assertNull(command2.getApplication());

        final Application app = this.appService.getApplication(APP_1_ID);
        final Set<Command> preCommands
                = this.appService.getCommandsForApplication(APP_1_ID);
        Assert.assertEquals(1, preCommands.size());
        Assert.assertEquals(COMMAND_1_ID, preCommands.iterator().next().getId());
View Full Code Here


     *
     * @throws GenieException
     */
    @Test(expected = GeniePreconditionException.class)
    public void testSetApplicationForCommandNoId() throws GenieException {
        this.service.setApplicationForCommand(null, new Application());
    }
View Full Code Here

     *
     * @throws GenieException
     */
    @Test(expected = GeniePreconditionException.class)
    public void testSetApplicationForCommandNoAppId() throws GenieException {
        this.service.setApplicationForCommand(COMMAND_2_ID, new Application());
    }
View Full Code Here

     *
     * @throws GenieException
     */
    @Test(expected = GenieNotFoundException.class)
    public void testSetApplicationForCommandNoCommandExists() throws GenieException {
        final Application app = new Application();
        app.setId(APP_1_ID);
        this.service.setApplicationForCommand(
                UUID.randomUUID().toString(), app);
    }
View Full Code Here

     *
     * @throws GenieException
     */
    @Test(expected = GenieNotFoundException.class)
    public void testSetApplicationForCommandNoAppExists() throws GenieException {
        final Application app = new Application();
        app.setId(UUID.randomUUID().toString());
        this.service.setApplicationForCommand(
                COMMAND_2_ID, app);
    }
View Full Code Here

     *
     * @throws GenieException
     */
    @Test
    public void testGetApplicationForCommand() throws GenieException {
        final Application app = this.service.getApplicationForCommand(COMMAND_1_ID);
        Assert.assertEquals(APP_1_ID, app.getId());
    }
View Full Code Here

TOP

Related Classes of com.netflix.genie.common.model.Application

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.