* automatically inherited picks up the initial value properly.
*/
public void testInitialValueWorks() {
// The initialised property.
final StylePropertyMock initialisedPropertyMock =
PropertiesTestHelper.createStylePropertyMock(
expectations, "initialisedPropertyMock", false, false);
final StyleValue initialisedValue = StyleKeywords.ARMENIAN;
// =====================================================================
// Set Expectations
// =====================================================================
PropertiesTestHelper.addExpectations(
expectations, definitionsMock,
new StylePropertyMock[]{
initialisedPropertyMock
});
expectations.add(new OrderedExpectations() {
public void add() {
// Test that initial values work.
// --------------------------------------
// The initialised property has already been set up to indicate
// that it does not automatically inherit.
// No value was specified.
valuesMock.expects.getSpecifiedValue(initialisedPropertyMock)
.returns(null);
// Get the initial value from the retriever.
initialValueFinderMock.expects
.getInitialValue(valuesMock,
initialisedPropertyMock.getStandardDetails())
.returns(initialisedValue);
// Set the computed value.
valuesMock.expects.setComputedValue(
initialisedPropertyMock, initialisedValue);