test(config): 补全对 ProxyConfig 的单元测试.

先前加了个 ProxyConfig.toString 方法, 所以补充了一下测试项.
This commit is contained in:
LamGC 2022-08-04 19:13:45 +08:00
parent eda0e522cd
commit 3ba4364a07
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

View File

@ -219,6 +219,12 @@ internal class ProxyConfigTest {
assertEquals(8080, actualConfig.port)
assertEquals(ProxyType.HTTP, actualConfig.type)
}
@Test
fun `toString test`() {
assertEquals("NO_PROXY", ProxyConfig(ProxyType.NO_PROXY).toString())
assertEquals("HTTP://example.org:1008", ProxyConfig(ProxyType.HTTP, "example.org", 1008).toString())
}
}
internal class MetricsConfigTest {