Package com.heroku.api

Examples of com.heroku.api.App


                "\"repo_size\":630784,\"git_url\":\"git@heroku.com:dropphotos.git\",\"repo_migrate_status\":\"complete\",\"dynos\":1,\"workers\":0}" +
                "]";

        final List<App> appList = parser.parse(appListWithConfiguredDomain.getBytes("UTF-8"), APP_LIST_TYPE);
        Assert.assertEquals(appList.size(), 1);
        final App app = appList.get(0);
        Assert.assertEquals(app.getName(), "app");
        Assert.assertEquals(app.getDomain().getDomain(), "herokuapp.com");
        Assert.assertEquals(app.getDomain().getDefault(), null);
        Assert.assertEquals(app.getDynos(), 1);
    }
View Full Code Here


                "\"repo_size\":630784,\"git_url\":\"git@heroku.com:dropphotos.git\",\"repo_migrate_status\":\"complete\",\"dynos\":1,\"workers\":0}" +
                "]";

        final List<App> appList = parser.parse(appListWithConfiguredDomain.getBytes("UTF-8"), APP_LIST_TYPE);
        Assert.assertEquals(appList.size(), 1);
        final App app = appList.get(0);
        Assert.assertEquals(app.getName(), "app");
        Assert.assertEquals(app.getDomain(), null);
        Assert.assertEquals(app.getDynos(), 1);
    }
View Full Code Here

    }

    @Test(dataProvider = "getParsers")
    public void unknownPropertiesShouldNotThrowExceptionsDuringParsing(Parser parser) throws UnsupportedEncodingException {
        String unknownProperty = "{\"unknown_property\":\"this property doesn't exist\"}";
        final App appList = parser.parse(unknownProperty.getBytes("UTF-8"), App.class);
        Assert.assertNull(appList.getName());
    }
View Full Code Here

        parse(new byte[]{}, null);
    }
   
    @Test
    public void genericTypeFromRequestInheritanceShouldParse() {
        App app = parse("{\"name\":\"test\"}".getBytes(), SubAppInfo.class);
        assertEquals(app.getName(), "test");
    }
View Full Code Here

        assertEquals(app.getName(), "test");
    }

    @Test
    public void genericTypeFromMultipleLevelsOfRequestInheritanceShouldParse() {
        App app = parse("{\"name\":\"test\"}".getBytes(), SubSubAppInfo.class);
        assertEquals(app.getName(), "test");
    }
View Full Code Here

        new HerokuAPI((String)null).listApps();
    }

    @Test
    public void testGetApplication() throws Exception {
        final App application = herokuApi.getApp(IDEA_TEST);
        assertEquals("http://idea-test.heroku.com/",application.getWebUrl());
    }
View Full Code Here

        new Gson().fromJson(invalidJson,new TypeReference<List<App>>(){}.getType());
    }
    @Test
    public void testCreateApplication() {
        final String prefix = "test-create";
        final App application = createApplication(prefix);
        herokuApi.destroyApp(application.getName());
    }
View Full Code Here

        herokuApi.destroyApp(application.getName());
    }

    private App createApplication(String prefix) {
        final String newName = prefix + System.currentTimeMillis();
        final App application = herokuApi.createApp(new App().named(newName));
        assertNotNull("created application",application);
        assertEquals("correct application name",newName,application.getName());
        return application;
    }
View Full Code Here

        return application;
    }

    @Test
    public void testDestroyApplication() throws InterruptedException {
        final App application = createApplication("test-destroy");
        herokuApi.destroyApp(application.getName());
        try {
            assertNull(herokuApi.getApp(application.getName()));
            fail("App still exists");
        } catch(com.heroku.api.exception.RequestFailedException rfe) { }
    }
View Full Code Here

    public int getColumnCount() {
        return Columns.values().length;
    }

    public Object getValueAt(int row, int column) {
        App app = getApplication(row);
        switch (columnFor(column)) {
            case Name:
                return app.getName();
            case Owner:
                return app.getOwnerEmail();
            case Url:
                return app.getWebUrl();
            case Created:
                return app.getCreatedAt();
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of com.heroku.api.App

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.