Fix up google doc tests

- Added service initialisation method to service so the "health" of the service can be determined
- Unit tests do not fail if the google doc service has not been configured correctly



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20046 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2010-04-30 09:04:09 +00:00
parent 6563c1c008
commit 4678f1420f
5 changed files with 189 additions and 55 deletions

View File

@@ -1,3 +1,21 @@
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.repo.googledocs;
import java.io.InputStream;
@@ -9,6 +27,13 @@ import org.alfresco.service.cmr.repository.NodeRef;
*/
public interface GoogleDocsService
{
/**
* Initialises the googles doc service, checking the provided credentials are correct. This need
* not be called manually since other service calls will initialise the service on demand, but it can
* be helpful to know the "health" of the service up front.
*/
void initialise() throws GoogleDocsServiceInitException;
/**
* Create a google doc from a given node. The content of the node will be used
* as a basis of the associated google doc. If the node has no content a new, empty google