In the project I work on we use XSD to generate some classes. XSD determines the order of elements, similar to this snippet:
<xs:element name="Customer_ID" type="com:Text6"/>
<xs:element name="Customer_Desc" type="com:Text150"/>
<xs:element name="Customer_Name" type="com:Text50"/>
<xs:element name="Institution" type="com:Text150" minOccurs="0"/>
<xs:element name="Scheme" type="com:Text50"/>
<xs:element name="Country" type="com:Country"/>
One colleague created some tests in which he sets object fields in different order comparing to the order in XSD, for example:
obj.setCustomerName("name");
obj.setCountry("EU");
obj.setScheme("scheme");
obj.setCustomerDesc("description");
//etc.
Furthermore, he uses different order in different tests. I argued that we should stick to the same order in code as it is in XSD because that way it's easier to read or change code/XSD. He thinks it's nitpicking because, at the end, object will have its fields initialized anyway.
I'd like to hear your thoughts - is this really nitpicking from my side or not?