Skip to content

Commit

Permalink
Merge pull request #50 from jmpascal/master
Browse files Browse the repository at this point in the history
[QA Fix]
  • Loading branch information
JM.PASCAL committed Jul 8, 2013
2 parents 776de0f + e427e32 commit f82cbfe
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 43 deletions.
2 changes: 1 addition & 1 deletion alfresco-mobile-android-async/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk</groupId>
<artifactId>alfresco-mobile-android-sdk</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>

<artifactId>alfresco-mobile-android-async</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion alfresco-mobile-android-client-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk</groupId>
<artifactId>alfresco-mobile-android-sdk</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>

<artifactId>alfresco-mobile-android-client-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.alfresco.mobile.android.api.services.SiteService;
import org.alfresco.mobile.android.api.services.cache.impl.CacheSiteExtraProperties;
import org.alfresco.mobile.android.api.session.AlfrescoSession;
import org.alfresco.mobile.android.api.session.CloudSession;
import org.alfresco.mobile.android.api.utils.JsonUtils;
import org.alfresco.mobile.android.api.utils.messages.Messagesl18n;
import org.apache.chemistry.opencmis.client.bindings.spi.http.Response;
Expand Down Expand Up @@ -326,9 +327,13 @@ public Site leaveSite(Site site)
}
catch (Exception e)
{
if (e.getMessage().contains("one site manager")) { throw new AlfrescoServiceException(
ErrorCodeRegistry.SITE_LAST_MANAGER, Messagesl18n.getString("ErrorCodeRegistry.SITE_LAST_MANAGER")); }

if(session instanceof CloudSession){
if (e.getMessage().contains("Permission was denied")) { throw new AlfrescoServiceException(
ErrorCodeRegistry.SITE_LAST_MANAGER, Messagesl18n.getString("ErrorCodeRegistry.SITE_LAST_MANAGER")); }
} else {
if (e.getMessage().contains("one site manager")) { throw new AlfrescoServiceException(
ErrorCodeRegistry.SITE_LAST_MANAGER, Messagesl18n.getString("ErrorCodeRegistry.SITE_LAST_MANAGER")); }
}
convertException(e);
}

Expand Down
2 changes: 1 addition & 1 deletion alfresco-mobile-android-ui-library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk</groupId>
<artifactId>alfresco-mobile-android-sdk</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>

<artifactId>alfresco-mobile-android-ui-library</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>org.alfresco.mobile.android.sdk</groupId>
<artifactId>alfresco-mobile-android-sdk</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
<packaging>pom</packaging>

<name>Alfresco Mobile Android SDK (Parent)</name>
Expand Down
2 changes: 1 addition & 1 deletion samples/alfresco-mobile-android-samples-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk.samples</groupId>
<artifactId>alfresco-mobile-android-sdk-samples</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>


Expand Down
2 changes: 1 addition & 1 deletion samples/alfresco-mobile-android-samples-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk.samples</groupId>
<artifactId>alfresco-mobile-android-sdk-samples</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>

<artifactId>alfresco-mobile-android-samples-extension</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion samples/alfresco-mobile-android-samples-hellorepo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk.samples</groupId>
<artifactId>alfresco-mobile-android-sdk-samples</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>

<artifactId>alfresco-mobile-android-samples-hellorepo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk</groupId>
<artifactId>alfresco-mobile-android-sdk</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>

<groupId>org.alfresco.mobile.android.sdk.samples</groupId>
Expand Down
2 changes: 1 addition & 1 deletion tests/alfresco-mobile-android-unit-test-api-cloud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk.tests</groupId>
<artifactId>alfresco-mobile-android-sdk-tests</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ protected int getTotalItems(int value)
{
return -1;
}

@Override
public void testSiteMembership()
{
// TODO Auto-generated method stub
super.testSiteMembership();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk.tests</groupId>
<artifactId>alfresco-mobile-android-sdk-tests</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk.tests</groupId>
<artifactId>alfresco-mobile-android-sdk-tests</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion tests/alfresco-mobile-android-unit-test-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk.tests</groupId>
<artifactId>alfresco-mobile-android-sdk-tests</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public void testDocumentMethod() throws Exception
// Empty content
Assert.assertEquals(0, doc.getContentStreamLength());
// Text plain in case of Alfresco 3.4
Assert.assertTrue((doc.getContentStreamMimeType() == null)
Assert.assertTrue((doc.getContentStreamMimeType().isEmpty())
|| (doc.getContentStreamMimeType().equals("text/plain")));

// ContentStream
Expand Down Expand Up @@ -818,6 +818,8 @@ public void testCreateFolderBasedOnCustomModel()
Folder customDoc2 = (Folder) alfsession.getServiceRegistry().getDocumentFolderService()
.updateProperties(customFolder, propertiesM);

customDoc2 = (Folder) alfsession.getServiceRegistry().getDocumentFolderService().refreshNode(customDoc2);

// Check Aspects
Assert.assertNotNull(customDoc2.getAspects());
Assert.assertTrue(customDoc2.hasAspect(ContentModel.ASPECT_TITLED));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public void testActivityStreamService()
List<ActivityEntry> feed = activityStreamService.getActivityStream();
if (feed == null || feed.isEmpty())
{
//Log.d("ActivityStreamService", "No stream activities available. Test aborted.");
// Log.d("ActivityStreamService",
// "No stream activities available. Test aborted.");
return;
}
int totalItems = feed.size();
Expand Down Expand Up @@ -360,17 +361,9 @@ public void testActivityServiceMethodsError()
Assert.assertTrue(session.getServiceRegistry().getActivityStreamService()
.getSiteActivityStream("privatesite").isEmpty());
}

if (isOnPremise() && isAlfrescoV4())
{
Assert.assertFalse(session.getServiceRegistry().getActivityStreamService()
.getSiteActivityStream("moderatedsite").isEmpty());
}
else
{
Assert.assertTrue(session.getServiceRegistry().getActivityStreamService()
.getSiteActivityStream("moderatedsite").isEmpty());
}

Assert.assertTrue(session.getServiceRegistry().getActivityStreamService()
.getSiteActivityStream("moderatedsite").isEmpty());
}
checkSession(session);
}
Expand Down Expand Up @@ -453,19 +446,17 @@ private void executeScript(String identifier)
final JsonDataWriter formData = new JsonDataWriter(jo);

// send and parse
Response response = NetworkHttpInvoker.invokePOST(
url, formData.getContentType(),
new Output()
{
public void write(OutputStream out) throws IOException
{
formData.write(out);
}
}, getAuthenticationProvider().getHTTPHeaders());
Response response = NetworkHttpInvoker.invokePOST(url, formData.getContentType(), new Output()
{
public void write(OutputStream out) throws IOException
{
formData.write(out);
}
}, getAuthenticationProvider().getHTTPHeaders());

if (response.getResponseCode() == HttpStatus.SC_OK)
{
//Log.d(TAG, "Execute script : ok");
// Log.d(TAG, "Execute script : ok");
}
}
catch (Exception e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1861,7 +1861,7 @@ public void testFavorite(){
Assert.assertNotNull(listDocuments);
Assert.assertEquals(listDocuments.size() + "", 1, listDocuments.size());
Document document = listDocuments.get(0);
Assert.assertEquals(doc.getIdentifier(), document.getIdentifier());
Assert.assertEquals(NodeRefUtils.getCleanIdentifier(doc.getIdentifier()), NodeRefUtils.getCleanIdentifier(document.getIdentifier()));
Assert.assertFalse(document.hasAllProperties());

Document refreshDocument= (Document) docfolderservice.refreshNode(doc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void testRepositoryInformation()
Assert.assertNotNull(alfsession.getRepositoryInfo());

Assert.assertEquals(ALFRESCO_CMIS_NAME, alfsession.getRepositoryInfo().getName());
if (alfsession.getRepositoryInfo().getDescription() != null)
if (alfsession.getRepositoryInfo().getDescription() != null && !alfsession.getRepositoryInfo().getDescription().isEmpty())
{
Assert.assertEquals(ALFRESCO_CMIS_NAME, alfsession.getRepositoryInfo().getDescription());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class UtilsTest extends AndroidTestCase
public void testSDKVersion()
{
Assert.assertNotNull(Version.SDK);
Assert.assertEquals("1.1.0", Version.SDK);
Assert.assertEquals("1.2.0", Version.SDK);
}

public void testPattern()
Expand Down
2 changes: 1 addition & 1 deletion tests/alfresco-mobile-android-unit-test-foundation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk.tests</groupId>
<artifactId>alfresco-mobile-android-sdk-tests</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.alfresco.mobile.android.sdk</groupId>
<artifactId>alfresco-mobile-android-sdk</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>

<groupId>org.alfresco.mobile.android.sdk.tests</groupId>
Expand Down

0 comments on commit f82cbfe

Please sign in to comment.