assembler.assembleModelInheritance( child, parent );
assertNull( child.getReporting() );
// parent is default, and child has no reporting section
parent = makeBaseModel( "parent" );
parent.setReporting( new Reporting() );
child = makeBaseModel( "child" );
assembler.assembleModelInheritance( child, parent );
assertFalse( child.getReporting().isExcludeDefaults() );
// parent is false, and child has no reporting section
parent = makeBaseModel( "parent" );
parent.setReporting( createReportingWithExcludeDefaults( false ) );
child = makeBaseModel( "child" );
assembler.assembleModelInheritance( child, parent );
assertFalse( child.getReporting().isExcludeDefaults() );
// parent is true, and child has no reporting section
parent = makeBaseModel( "parent" );
parent.setReporting( createReportingWithExcludeDefaults( true ) );
child = makeBaseModel( "child" );
assembler.assembleModelInheritance( child, parent );
assertTrue( child.getReporting().isExcludeDefaults() );
// parent has no reporting section, child is false
parent = makeBaseModel( "parent" );
child = makeBaseModel( "child" );
child.setReporting( createReportingWithExcludeDefaults( false ) );
assembler.assembleModelInheritance( child, parent );
assertFalse( child.getReporting().isExcludeDefaults() );
// parent is default, and child is false
parent = makeBaseModel( "parent" );
parent.setReporting( new Reporting() );
child = makeBaseModel( "child" );
child.setReporting( createReportingWithExcludeDefaults( false ) );
assembler.assembleModelInheritance( child, parent );
assertFalse( child.getReporting().isExcludeDefaults() );
// parent is false, and child is false
parent = makeBaseModel( "parent" );
parent.setReporting( createReportingWithExcludeDefaults( false ) );
child = makeBaseModel( "child" );
child.setReporting( createReportingWithExcludeDefaults( false ) );
assembler.assembleModelInheritance( child, parent );
assertFalse( child.getReporting().isExcludeDefaults() );
// parent is true, and child is false
parent = makeBaseModel( "parent" );
parent.setReporting( createReportingWithExcludeDefaults( true ) );
child = makeBaseModel( "child" );
child.setReporting( createReportingWithExcludeDefaults( false ) );
assembler.assembleModelInheritance( child, parent );
assertFalse( child.getReporting().isExcludeDefaults() );
// parent has no reporting section, child is true
parent = makeBaseModel( "parent" );
child = makeBaseModel( "child" );
child.setReporting( createReportingWithExcludeDefaults( true ) );
assembler.assembleModelInheritance( child, parent );
assertTrue( child.getReporting().isExcludeDefaults() );
// parent is default, and child is true
parent = makeBaseModel( "parent" );
parent.setReporting( new Reporting() );
child = makeBaseModel( "child" );
child.setReporting( createReportingWithExcludeDefaults( true ) );
assembler.assembleModelInheritance( child, parent );
assertTrue( child.getReporting().isExcludeDefaults() );
// parent is false, and child is true
parent = makeBaseModel( "parent" );
parent.setReporting( createReportingWithExcludeDefaults( false ) );
child = makeBaseModel( "child" );
child.setReporting( createReportingWithExcludeDefaults( true ) );
assembler.assembleModelInheritance( child, parent );
assertTrue( child.getReporting().isExcludeDefaults() );
// parent is true, and child is true
parent = makeBaseModel( "parent" );
parent.setReporting( createReportingWithExcludeDefaults( true ) );
child = makeBaseModel( "child" );
child.setReporting( createReportingWithExcludeDefaults( true ) );
assembler.assembleModelInheritance( child, parent );
assertTrue( child.getReporting().isExcludeDefaults() );
// parent has no reporting section, child is default
parent = makeBaseModel( "parent" );
child = makeBaseModel( "child" );
child.setReporting( new Reporting() );
assembler.assembleModelInheritance( child, parent );
assertFalse( child.getReporting().isExcludeDefaults() );
// parent is default, and child is default
parent = makeBaseModel( "parent" );
parent.setReporting( new Reporting() );
child = makeBaseModel( "child" );
child.setReporting( new Reporting() );
assembler.assembleModelInheritance( child, parent );
assertFalse( child.getReporting().isExcludeDefaults() );
// parent is false, and child is default
parent = makeBaseModel( "parent" );
parent.setReporting( createReportingWithExcludeDefaults( false ) );
child = makeBaseModel( "child" );
child.setReporting( new Reporting() );
assembler.assembleModelInheritance( child, parent );
assertFalse( child.getReporting().isExcludeDefaults() );
// parent is true, and child is default
parent = makeBaseModel( "parent" );
parent.setReporting( createReportingWithExcludeDefaults( true ) );
child = makeBaseModel( "child" );
child.setReporting( new Reporting() );
assembler.assembleModelInheritance( child, parent );
assertTrue( child.getReporting().isExcludeDefaults() );
}