mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Change file modified date on returned content from web script of type 'ContentStream', fix for SLNG- 894, change relating to SLNG-989, assertNotNull added to JS unit test API
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10223 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2165,8 +2165,17 @@ public class ScriptNode implements Serializable, Scopeable
|
||||
*/
|
||||
public String[] getTags()
|
||||
{
|
||||
String[] result = null;
|
||||
List<String> tags = this.services.getTaggingService().getTags(this.nodeRef);
|
||||
return (String[])tags.toArray(new String[tags.size()]);
|
||||
if (tags.isEmpty() == true)
|
||||
{
|
||||
result = new String[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
result = (String[])tags.toArray(new String[tags.size()]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -49,6 +49,23 @@ public class ScriptTestUtils extends BaseScopableProcessorExtension
|
||||
}
|
||||
}
|
||||
|
||||
public void assertNotEquals(Object expected, Object value)
|
||||
{
|
||||
assertNotEquals(expected, value, null);
|
||||
}
|
||||
|
||||
public void assertNotEquals(Object expected, Object value, String message)
|
||||
{
|
||||
if (expected.equals(value) == true)
|
||||
{
|
||||
if (message == null)
|
||||
{
|
||||
message = "Expected value '" + expected + "' should not match recieved value '" + value + "'";
|
||||
}
|
||||
throw new AlfrescoRuntimeException(message);
|
||||
}
|
||||
}
|
||||
|
||||
public void assertNotNull(Object value)
|
||||
{
|
||||
assertNotNull(value, null);
|
||||
|
@@ -14,6 +14,7 @@ function testAddRemoveTag()
|
||||
{
|
||||
var tags = document.tags;
|
||||
test.assertNotNull(tags);
|
||||
test.assertNotEquals(undefined, tags);
|
||||
test.assertEquals(0, tags.length);
|
||||
|
||||
document.properties.title = "A change is as good as a rest!";
|
||||
|
Reference in New Issue
Block a user