Sequence Diagram 3: Validation Fail?

Specification, page 30 line 7-8:

Event customer groups need a favorite dish for every restaurant type they consider
visiting.

Listing A.2:

{
  " customers ":[
    {
      "id": 6, "type": "EVENT", "size": 16, " tableType ": " COMMON ",
      " visitingTick ": 4, " foodPreferences ": [],
      " restaurantTypes ": [" EUROPEAN "," AFRICAN "],
      " foodPreferences ": [{"size": 16, " excludedIngredients ": [" chicken "," potato "
      ]}],
      " eventEvening ": 35,
      " favoriteDishes ": {" EUROPEAN ": " potato soup"},
    }
  ]
}

In this Scenario, must this not immediately fail in validation due to the group having no favourite dish for restaurantType=AFRICAN?

Also, there seems to be an extra , behind the third to last }.

Is this a mistake in the spec?

2 Likes

Hi,
Please check this adjustment.

1 Like

I fail to see how this addresses the issue. In the correction, Group 6 still has AFRICAN listed in their restaurantTypes, while still not having a favourite dish for that kind of restaurant.

The correction seems to only remove the extra "foodPreferences": [],, not change anything relevant to this, right?

1 Like

Hello, I wanted to ask again if this json really is valid?
Because in the specification it says

Event customer groups need a favorite dish for every restaurant type they consider
visiting.

And in the json there only is a favorite Dish for “EUROPEAN” but not “AFRICAN”.

It would be nice to get a clarification for this!! :slight_smile:

4 Likes

Did you check that :up_arrow: ?

1 Like

That doesn’t address it. The given adjusted A2 still has two restaurant types for the event group, but only a favorite dish for one of the types, while the spec says there should be one for both.

4 Likes

I’ve written a system test that checks

Event customer groups need a favorite dish for every restaurant type they consider visiting.

Which is the requirement this thread is about.

The test fails against the reference implementation for me :man_shrugging:

Maybe my test is broken, but I’m pretty sure it is correct

My test was apparently wrong :man_facepalming:

Check this adjustment.

3 Likes