Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.1
-
Fix Version/s: 1.2
-
Component/s: Core Runtime
-
Labels:None
-
Environment:-
Description
In org.qi4j.runtime.property.PropertyTest#testProperty() we should
Assert.assertEquals( "JAYWAY", company.name().get() );
CapitalizeConcern.set() doesn't kick in.
No effect either with SideEffectOf<Property<String>> (using @SideEffects).

It is actually not a bug, it is an incorrect testcase. The essence is like this;
@Concerns( CapitalizeConcern.class )
{ @Capitalized Property<String> name(); }public interface Nameable
@AppliesTo( Capitalized.class )
{ newValue = newValue.toUpperCase(); next.set( newValue ); }public static abstract class CapitalizeConcern
extends ConcernOf<Property<String>>
implements Property<String>
{
public void set( String newValue )
throws IllegalArgumentException
}
where the intention of the test is to apply the concern on the set() method.
However, as it is written, the @Capitalized annotation is on the name() method, and hence being at the "wrong" level. To make it work as intended, an implementation of Nameable is needed, where the set() method is provided and marked @Capitalized.
I am therefor closing this bug report.