Skip to content

Commit ab8f3ab

Browse files
committed
[Test] Change minified json to pretty printed
1 parent c57c017 commit ab8f3ab

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

Tests/SwiftJavaToolTests/JavaRepositoryTests.swift

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,25 @@ class JavaRepositoryTests {
6969

7070
@Test
7171
func respositoryDecoding() throws {
72-
let data = #"[{"type":"maven","url":"https://repo.mycompany.com/maven2"},{"type":"maven","url":"https://repo2.mycompany.com/maven2","artifactUrls":["https://repo.mycompany.com/jars","https://repo.mycompany.com/jars2"]},{"type":"maven","url":"https://secure.repo.com/maven2","credentials":{"username":"user123","password":"secret"}},{"type":"mavenLocal","includeGroups":["com.example.myproject"]},{"type":"maven","url":"build/repo"},{"type":"mavenCentral"},{"type":"mavenLocal"},{"type":"google"}]"#.data(using: .utf8)!
72+
let data = """
73+
[
74+
{ "type": "maven", "url": "https://repo.mycompany.com/maven2" },
75+
{
76+
"type": "maven",
77+
"url": "https://repo2.mycompany.com/maven2",
78+
"artifactUrls": [
79+
"https://repo.mycompany.com/jars",
80+
"https://repo.mycompany.com/jars2"
81+
]
82+
},
83+
{ "type": "maven", "url": "https://secure.repo.com/maven2" },
84+
{ "type": "mavenLocal", "includeGroups": ["com.example.myproject"] },
85+
{ "type": "maven", "url": "build/repo" },
86+
{ "type": "mavenCentral" },
87+
{ "type": "mavenLocal" },
88+
{ "type": "google" }
89+
]
90+
""".data(using: .utf8)!
7391
let repositories = try JSONDecoder().decode([JavaRepositoryDescriptor].self, from: data)
7492
#expect(!repositories.isEmpty, "Expected to decode at least one repository")
7593
#expect(repositories.contains(.maven(url: "https://repo.mycompany.com/maven2")), "Expected to contain the default repository")

0 commit comments

Comments
 (0)