Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2759

[JUnit] Either validate or ignore public helper methods in mixin superclass ... (was resulting in mixin not rendering, even though was in metamodel)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0-RC4
    • None

    Description

      was resulting in mixin not rendering, even though was in metamodel

      for example:

       @RequiredArgsConstructor
      public abstract class UpdateTimeWindow {
        private final BaseEntity baseEntity;
      
        public abstract TimeWindow getTimeWindow();  // <<<<<<<<<<< PROBLEMATIC...
        public abstract void initTimeWindow();       // <<<<<<<<<<<
      
        public BaseEntity act(String startTime, String endTime) {
          if (getTimeWindow() == null) {
            initTimeWindow();
          }
          getTimeWindow().setValue(startTime, endTime);
          return baseEntity;
        }
      

      and then:

      public class UpdateAdvanceDeliveryTimeWindow extends UpdateTimeWindow {
          public UpdateAdvanceDeliveryTimeWindow() {
              super(Client.this);
          }
          public BaseEntity act(String startTime, String endTime) { return super.act(startTime, endTime); }
          public TimeWindow getTimeWindow() {
              return Client.this.getAdvanceDeliveryTimeWindow();
          }
          public void initTimeWindow() {
              advanceDeliveryTimeWindow = new TimeWindow();
          }
      }
       

      where `TimeWindow` is an embedded entity.

      UPDATE:

      Even making these supporting methods protected didn't seem to do the job...

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: