Skip to content
Snippets Groups Projects
Commit 4c3f6daf authored by kaloyane's avatar kaloyane
Browse files

minor: fix the test to run on JVM 1.5 and 1.6

SVN: 21152
parent a0764ac3
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,8 @@
package ch.systemsx.cisd.openbis.generic.server.business;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import org.testng.AssertJUnit;
import org.testng.annotations.Test;
......@@ -155,18 +157,20 @@ public class PropertiesBatchManagerTest extends AssertJUnit
private void assertProperties(String expectedProperties, IPropertiesBean propertiesBean)
{
StringBuilder builder = new StringBuilder();
Set<String> expected = new HashSet<String>();
for (String prop : expectedProperties.split(","))
{
expected.add(prop.trim());
}
Set<String> actual = new HashSet<String>();
IEntityProperty[] properties = propertiesBean.getProperties();
for (IEntityProperty property : properties)
{
if (builder.length() > 0)
{
builder.append(", ");
}
builder.append(property.getPropertyType().getCode()).append(':');
builder.append(property.getValue());
String propString = property.getPropertyType().getCode() + ":" + property.getValue();
actual.add(propString);
}
assertEquals(expectedProperties, builder.toString());
assertEquals(expected, actual);
}
private void addProperties(IPropertiesBean propertiesBean, PropertyBuilder... builders)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment