Package org.zanata.security

Examples of org.zanata.security.ZanataCredentials


            .use("identity", identity)
            .ignoreNonResolvable()
            .autowire(RemoteLoggingHandler.class);
      // @formatter:on

        when(identity.getCredentials()).thenReturn(new ZanataCredentials());
    }
View Full Code Here


        MockitoAnnotations.initMocks(this);
        when(mockIdentity.hasPermission(anyString(), anyString(), anyVararg()))
                .thenReturn(true);
        when(mockIdentity.hasPermission(anyString(), anyString())).thenReturn(
                true);
        ZanataCredentials credentials = new ZanataCredentials();
        credentials.setUsername("testuser");
        when(mockIdentity.getCredentials()).thenReturn(credentials);

        SeamAutowire seamAutowire = getSeamAutowire();
        seamAutowire.use("session", getSession()).use("identity", mockIdentity)
                .useImpl(CopyTransServiceImpl.class)
View Full Code Here

    private void mockRequiredServices() throws IOException {
        mockProjectAndVersionStatus();
        mockHasUploadPermission();
        mockHasPlainTextAdapter();

        ZanataCredentials creds = new ZanataCredentials();
        creds.setUsername("johnsmith");
        when(identity.getCredentials()).thenReturn(creds);

        File someFile = File.createTempFile("tests", "something");
        when(documentUploadUtil.persistTempFileFromUpload(conf.uploadForm))
                .thenReturn(someFile);
View Full Code Here

TOP

Related Classes of org.zanata.security.ZanataCredentials

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.