assertThat(toString(actual, expected), actual, equalTo(expected));
}
@Test
public void shouldBuildAPathWithUndefinedWorkbenchPartId() {
IWorkbenchPartDescriptor undefined =
new UndefinedWorkbenchPartDescriptor("abc123");
ICategory[] categories = {
Category.DATE, Category.WORKSPACE, Category.WORKBENCH_TOOL};
List<TreePath> expected = asList(newPath(date, ws, undefined, duration));
IPartData data = mock(IPartData.class);
given(data.get(IPartData.DATE)).willReturn(date);
given(data.get(IPartData.DURATION)).willReturn(duration);
given(data.get(IPartData.PART_ID)).willReturn(undefined.getId());
given(data.get(IPartData.WORKSPACE)).willReturn(ws);
ICategoryProvider provider = mock(ICategoryProvider.class);
given(provider.getSelected()).willReturn(asList(categories));
ITreePathBuilder builder = create(provider);