| Total Complexity | 1 |
| Total Lines | 12 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | package com.mmdemirbas.urlbuilder; |
||
| 8 | final class UrlBuilderJavaTest { |
||
| 9 | @Test |
||
| 10 | void sample() { |
||
| 11 | Assertions.assertEquals( |
||
| 12 | "http://foo.com/with%20spaces/path/with/varArgs/&=%3F%2F;matrix=param%3F?fancy%20%2B%20name=fancy?%3Dvalue#%23?=", |
||
| 13 | UrlBuilder.from("http", "foo.com") |
||
| 14 | .addPath("with spaces") |
||
| 15 | .addPaths("path", "with", "varArgs") |
||
| 16 | .addPath("&=?/", pair("matrix", "param?")) |
||
| 17 | .setQuery(pair("fancy + name", "fancy?=value")) |
||
| 18 | .setFragment("#?=") |
||
| 19 | .buildUrlString()); |
||
| 20 | } |
||
| 22 |