Converts address text to URI, including non-URL schemes
All 3 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.
expected outcome
broken scenario
| Scenario | Input value | Parameter type? | URI scheme? |
|---|---|---|---|
| Web | https://junit.org/ | java.net.URI | https |
| Local file | file:///tmp/test | java.net.URI | file |
| URN | urn:isbn:0451450523 | java.net.URI | urn |