Offset[] offsets = offsetCalculator.calculateOffsets(weekTimeFrame, myStack.WEEK_AS_BOTTOM_UNIT, monday.getTime(), myStack.getDefaultTimeUnit(), 70);
assertEquals("Unexpected offsets count", 7, offsets.length);
TaskActivity fridayActivity = task.getActivities()[0];
int pixelOffset = 0;
for (int i=0; i<offsets.length; i++) {
Offset next = offsets[i];
pixelOffset = next.getOffsetPixels();
if (fridayActivity.getStart().equals(next.getOffsetEnd())) {
break;
}
}
assertEquals("Unexpected offset in pixels, for task starting on friday", 40, pixelOffset);
}