Converts a month and day written with two leading hyphens to MonthDay
All 2 scenarios hold
Cell text converts automatically to the declared parameter type. There is no type converter to write.
Every table below reads the same way. An Input value column holds the text as written in the cell. A Parameter type column holds the type the text converts to. Expectation columns state observable properties of the object the test method receives. Each row therefore shows that the text became a valid object of that type, and not merely that it converted.
The test method signature fixes a parameter type, and no row can vary it. Each type therefore gets its own short table.
Each type here names a date or a time alone. None of them carries an offset from UTC or a time zone. None of them therefore fixes a point on the world timeline.
| Scenario | Input value | Parameter type? | MonthDay month? | MonthDay day of month? |
|---|---|---|---|---|
| Pi Day | --03-14 | java.time.MonthDay | MARCH | 14 |
| Christmas Day | --12-25 | java.time.MonthDay | DECEMBER | 25 |