Package com.google.appengine.tck.event

Examples of com.google.appengine.tck.event.Property


        TestLifecycles.before(event);
        return event.execute();
    }

    protected boolean required(String propertyName) {
        Property result = property(propertyName);
        Boolean required = result.required();
        return (required == null || required); // by default null means it's required
    }
View Full Code Here


    @Test
    @InSequence(20)
    public void testClientIp() throws Exception {
        RequestLogs requestLogs1 = getRequestLogs1();

        Property ip = property("testClientIp");
        if (ip.exists()) {
            assertEquals(ip.getPropertyValue(), requestLogs1.getIp());
        } else {
            assertRegexpMatches(REGEX_IP4, requestLogs1.getIp());
        }
    }
View Full Code Here

     */
    @Test
    public void testGetDefaultGcsBucketName() {
        ApiProxy.Environment env = ApiProxy.getCurrentEnvironment();
        String expectedBucketName;
        Property property = property("testGetDefaultGcsBucketName");
        if (property.exists()) {
            expectedBucketName = property.getPropertyValue();
        } else {
            expectedBucketName = (String) env.getAttributes().get("com.google.appengine.runtime.default_version_hostname");
        }

        try {
View Full Code Here

    }

    protected String getExpectedAppId(String context) {
        String expectedAppId = appIdproperty;
        if (expectedAppId == null) {
            Property property = property(context);
            if (property.exists()) {
                expectedAppId = property.getPropertyValue();
            } else {
                String nullIdMsg = "Either -Dappengine.appId= or test-contexts.properties must set the app id.";
                throw new IllegalStateException(nullIdMsg);
            }
        }
View Full Code Here

    }

    protected String getExpectedAppHostname(String context) {
        String expectedHostname = appEngineServer;
        if (expectedHostname == null) {
            Property property = property(context);
            if (property.exists()) {
                expectedHostname = property.getPropertyValue();
            } else {
                String nullHostnameMsg = "Either -Dappengine.server= or test-contexts.properties must set the server name.";
                throw new IllegalStateException(nullHostnameMsg);
            }
        }
View Full Code Here

    /**
     * This can get a single scope only.  Unable to automate requesting token for multiple scopes.
     */
    private String getGoogleAccessToken(String email, String pw, String client_id, String redirect_uri, String scope) {
        Property staticToken = property("authToken");
        if (staticToken.exists()) {
            return staticToken.getPropertyValue();
        }

        // https://accounts.google.com/o/oauth2/auth?response_type=token&client_id=37298738223-o26xasxd7a217srs4t7ue1fudmt1ao1ge5.apps.googleusercontent.com&redirect_uri=https://[YOUR_TEST_APP].appspot.com/your_redirect_path&scope=https://www.googleapis.com/auth/userinfo.email

        String requestTokenUrl = String.format("%s?response_type=token&client_id=%s&redirect_uri=%s&scope=%s",
View Full Code Here

        nonAdminTestingAccountPw = System.getProperty("appengine.nonAdminTestingAccount.pw");

        oauthClientId = System.getProperty("appengine.oauth.clientId");
        oauthRedirectUri = System.getProperty("appengine.oauth.redirectUri");

        Property nonAdmin = property("nonAdminTestingAccount");
        if (nonAdmin.exists()) {
            nonAdminTestingAccountEmail = nonAdmin.getPropertyValue();
            nonAdminTestingAccountPw = "boguspw";
        }

        Property accountRequired = property("testingAccountRequired");
        boolean testingAccountRequired = !accountRequired.exists() || accountRequired.getPropertyValue().equalsIgnoreCase("true");

        if (nonAdminTestingAccountEmail == null && testingAccountRequired) {
            throw new IllegalStateException("-Dappengine.nonAdminTestingAccount.email is not defined.");
        }
        if (nonAdminTestingAccountPw == null && testingAccountRequired) {
View Full Code Here

TOP

Related Classes of com.google.appengine.tck.event.Property

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.