@@ -113,20 +113,20 @@ final class GenerativeModelTests: XCTestCase {
113113 XCTAssertEqual ( candidate. content. parts. count, 1 )
114114 XCTAssertEqual ( response. text, " Some information cited from an external source " )
115115 let citationMetadata = try XCTUnwrap ( candidate. citationMetadata)
116- XCTAssertEqual ( citationMetadata. citationSources . count, 3 )
117- let citationSource1 = try XCTUnwrap ( citationMetadata. citationSources [ 0 ] )
116+ XCTAssertEqual ( citationMetadata. citations . count, 3 )
117+ let citationSource1 = try XCTUnwrap ( citationMetadata. citations [ 0 ] )
118118 XCTAssertEqual ( citationSource1. uri, " https://www.example.com/some-citation-1 " )
119119 XCTAssertEqual ( citationSource1. startIndex, 0 )
120120 XCTAssertEqual ( citationSource1. endIndex, 128 )
121121 XCTAssertNil ( citationSource1. title)
122122 XCTAssertNil ( citationSource1. license)
123- let citationSource2 = try XCTUnwrap ( citationMetadata. citationSources [ 1 ] )
123+ let citationSource2 = try XCTUnwrap ( citationMetadata. citations [ 1 ] )
124124 XCTAssertEqual ( citationSource2. title, " some-citation-2 " )
125125 XCTAssertEqual ( citationSource2. startIndex, 130 )
126126 XCTAssertEqual ( citationSource2. endIndex, 265 )
127127 XCTAssertNil ( citationSource2. uri)
128128 XCTAssertNil ( citationSource2. license)
129- let citationSource3 = try XCTUnwrap ( citationMetadata. citationSources [ 2 ] )
129+ let citationSource3 = try XCTUnwrap ( citationMetadata. citations [ 2 ] )
130130 XCTAssertEqual ( citationSource3. uri, " https://www.example.com/some-citation-3 " )
131131 XCTAssertEqual ( citationSource3. startIndex, 272 )
132132 XCTAssertEqual ( citationSource3. endIndex, 431 )
@@ -947,7 +947,7 @@ final class GenerativeModelTests: XCTestCase {
947947 responses. append ( content)
948948 XCTAssertNotNil ( content. text)
949949 let candidate = try XCTUnwrap ( content. candidates. first)
950- if let sources = candidate. citationMetadata? . citationSources {
950+ if let sources = candidate. citationMetadata? . citations {
951951 citations. append ( contentsOf: sources)
952952 }
953953 }
0 commit comments