Package slash.navigation.rest

Examples of slash.navigation.rest.SimpleCredentials


        return createRoute(category, fileKey, description, USERNAME, PASSWORD);
    }

    protected Post createUser(String fileName,
                              String authenticationUserName, String authenticationPassword) throws IOException {
        Post request = new Post(POST_USERS_URL, new SimpleCredentials(authenticationUserName, authenticationPassword));
        request.addFile("file", new File(TEST_PATH + fileName));
        return request;
    }
View Full Code Here


    protected Post createUser(String userName, String password,
                              String firstName, String lastName, String email,
                              String authenticationUserName, String authenticationPassword) throws IOException, JAXBException {
        String xml = createUserXml(userName, password, firstName, lastName, email);
        Post request = new Post(POST_USERS_URL, new SimpleCredentials(authenticationUserName, authenticationPassword));
        request.addFile("file", xml.getBytes());
        return request;
    }
View Full Code Here

        return request;
    }

    protected Delete deleteUser(String userName,
                                String authenticationUserName, String authenticationPassword) {
        return new Delete(USERS_URL + userName + GPX_URL_POSTFIX, new SimpleCredentials(authenticationUserName, authenticationPassword));
    }
View Full Code Here

    }


    protected Post createFile(String fileName,
                              String authenticationUserName, String authenticationPassword) throws IOException {
        Post request = new Post(FILES_URL, new SimpleCredentials(authenticationUserName, authenticationPassword));
        File file = new File(TEST_PATH + fileName);
        assertTrue(file.exists());
        request.addFile("file", file);
        return request;
    }
View Full Code Here

    }

    private Put updateRoute(int routeKey, String category, Integer fileKey, String description,
                            String authenticationUserName, String authenticationPassword) throws IOException, JAXBException {
        String xml = createRouteXml(category, fileKey, description);
        Put request = new Put(ROUTES_URL + routeKey + GPX_URL_POSTFIX, new SimpleCredentials(authenticationUserName, authenticationPassword));
        request.addFile("file", xml.getBytes());
        return request;
    }
View Full Code Here

    private Put updateRoute(int routeKey, String category, Integer fileKey, String description) throws IOException, JAXBException {
        return updateRoute(routeKey, category, fileKey, description, USERNAME, PASSWORD);
    }

    private Delete deleteRoute(int key, String authenticationUserName, String authenticationPassword) {
        return new Delete(ROUTES_URL + key + GPX_URL_POSTFIX, new SimpleCredentials(authenticationUserName, authenticationPassword));
    }
View Full Code Here

    protected RouteFeedback routeFeedback;

    @Before
    public void setUp() throws Exception {
        routeFeedback = new RouteFeedback(FEEDBACK, new SimpleCredentials(USERNAME, PASSWORD));
    }
View Full Code Here

TOP

Related Classes of slash.navigation.rest.SimpleCredentials

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.