Merged HEAD (5.2) to 5.2.N (5.2.1)

126554 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
      124208 gjames: RA-892: Improved the error message handling


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126900 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 12:08:05 +00:00
parent e8cd9542c3
commit 0779769e84
5 changed files with 35 additions and 14 deletions

View File

@@ -225,7 +225,7 @@ public class ResourceWebScriptHelperTests
theClause = getClause(paramName, "x/,z");
fail("Should throw an InvalidSelectException");
}
catch (InvalidArgumentException error)
catch (InvalidSelectException error)
{
//this is correct
}
@@ -235,7 +235,7 @@ public class ResourceWebScriptHelperTests
theClause = getClause(paramName, "/x'n,/z");
fail("Should throw an InvalidSelectException");
}
catch (InvalidArgumentException error)
catch (InvalidSelectException error)
{
//this is correct
}
@@ -245,7 +245,7 @@ public class ResourceWebScriptHelperTests
theClause = getClause(paramName, "/foo/0");
fail("Should throw an InvalidSelectException. Legal identifiers must start with a letter not zero");
}
catch (InvalidArgumentException error)
catch (InvalidSelectException error)
{
//this is correct
}
@@ -255,11 +255,21 @@ public class ResourceWebScriptHelperTests
theClause = getClause(paramName, "/");
fail("Should throw an InvalidSelectException. No identifier specified.");
}
catch (InvalidArgumentException error)
catch (InvalidSelectException error)
{
//this is correct
}
}
try
{
theClause = getClause(paramName, "path, isLink");
fail("Should throw an InvalidSelectException. No identifier specified.");
}
catch (InvalidSelectException error)
{
//this is correct
}
theClause = getClause(paramName, "king/kong");
assertTrue("has a valid "+paramName, theClause.size() == 1);
assertEquals("king/kong",theClause.get(0));