Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 379798

Summary: Compile errors in server tests
Product: [ECD] Orion Reporter: John Arthorne <john.arthorne>
Component: ServerAssignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: soaibe990
Version: 0.5   
Target Milestone: 0.5 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2012-05-17 08:46:18 EDT
The previous two builds had compile errors in server tests. This was due to an extra bundle dependency being added that wasn't in our build:

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/diff/tests/org.eclipse.orion.server.tests/META-INF/MANIFEST.MF?id=6d548a9cb873e04ba6baa7d6bbc6e81c6d54540c

That org.hamcrest bundle also requires three other bundles that are not in our build. All of those dependencies were being added to get a convenience method that checked for presence of an item in an array. The resulting code looked very confusing to me:

assertThat(nestedProperties, IsArrayContaining.hasItemInArray(PropertyMatcher.isPropertyNameEqual(TestResource.INT_PROPERTY)));

I have replaced it with a simple helper method, so the tests look like this:

assertHasProperty(nestedProperties, TestResource.INT_PROPERTY);

I have removed the unneeded dependencies on the extra hamcrest bundles.