Skip to content

Commit 869d23c

Browse files
committed
Fix parameter label in tests
1 parent 7facac9 commit 869d23c

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

FirebaseVertexAI/Tests/Unit/ChatTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ final class ChatTests: XCTestCase {
5959
options: FirebaseOptions(googleAppID: "ignore",
6060
gcmSenderID: "ignore"))
6161
let model = GenerativeModel(
62-
name: "my-model",
62+
modelResourceName: "my-model",
6363
firebaseInfo: FirebaseInfo(
6464
projectID: "my-project-id",
6565
apiKey: "API_KEY",

FirebaseVertexAI/Tests/Unit/GenerativeModelTests.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ final class GenerativeModelTests: XCTestCase {
7070
configuration.protocolClasses = [MockURLProtocol.self]
7171
urlSession = try XCTUnwrap(URLSession(configuration: configuration))
7272
model = GenerativeModel(
73-
name: testModelResourceName,
73+
modelResourceName: testModelResourceName,
7474
firebaseInfo: testFirebaseInfo(),
7575
apiConfig: apiConfig,
7676
tools: nil,
@@ -276,7 +276,7 @@ final class GenerativeModelTests: XCTestCase {
276276
)
277277
let model = GenerativeModel(
278278
// Model name is prefixed with "models/".
279-
name: "models/test-model",
279+
modelResourceName: "models/test-model",
280280
firebaseInfo: testFirebaseInfo(),
281281
apiConfig: apiConfig,
282282
tools: nil,
@@ -399,7 +399,7 @@ final class GenerativeModelTests: XCTestCase {
399399
func testGenerateContent_appCheck_validToken() async throws {
400400
let appCheckToken = "test-valid-token"
401401
model = GenerativeModel(
402-
name: testModelResourceName,
402+
modelResourceName: testModelResourceName,
403403
firebaseInfo: testFirebaseInfo(appCheck: AppCheckInteropFake(token: appCheckToken)),
404404
apiConfig: apiConfig,
405405
tools: nil,
@@ -420,7 +420,7 @@ final class GenerativeModelTests: XCTestCase {
420420
func testGenerateContent_dataCollectionOff() async throws {
421421
let appCheckToken = "test-valid-token"
422422
model = GenerativeModel(
423-
name: testModelResourceName,
423+
modelResourceName: testModelResourceName,
424424
firebaseInfo: testFirebaseInfo(appCheck: AppCheckInteropFake(token: appCheckToken),
425425
privateAppID: true),
426426
apiConfig: apiConfig,
@@ -442,7 +442,7 @@ final class GenerativeModelTests: XCTestCase {
442442

443443
func testGenerateContent_appCheck_tokenRefreshError() async throws {
444444
model = GenerativeModel(
445-
name: testModelResourceName,
445+
modelResourceName: testModelResourceName,
446446
firebaseInfo: testFirebaseInfo(appCheck: AppCheckInteropFake(error: AppCheckErrorFake())),
447447
apiConfig: apiConfig,
448448
tools: nil,
@@ -463,7 +463,7 @@ final class GenerativeModelTests: XCTestCase {
463463
func testGenerateContent_auth_validAuthToken() async throws {
464464
let authToken = "test-valid-token"
465465
model = GenerativeModel(
466-
name: testModelResourceName,
466+
modelResourceName: testModelResourceName,
467467
firebaseInfo: testFirebaseInfo(auth: AuthInteropFake(token: authToken)),
468468
apiConfig: apiConfig,
469469
tools: nil,
@@ -483,7 +483,7 @@ final class GenerativeModelTests: XCTestCase {
483483

484484
func testGenerateContent_auth_nilAuthToken() async throws {
485485
model = GenerativeModel(
486-
name: testModelResourceName,
486+
modelResourceName: testModelResourceName,
487487
firebaseInfo: testFirebaseInfo(auth: AuthInteropFake(token: nil)),
488488
apiConfig: apiConfig,
489489
tools: nil,
@@ -503,7 +503,7 @@ final class GenerativeModelTests: XCTestCase {
503503

504504
func testGenerateContent_auth_authTokenRefreshError() async throws {
505505
model = GenerativeModel(
506-
name: "my-model",
506+
modelResourceName: "my-model",
507507
firebaseInfo: testFirebaseInfo(auth: AuthInteropFake(error: AuthErrorFake())),
508508
apiConfig: apiConfig,
509509
tools: nil,
@@ -900,7 +900,7 @@ final class GenerativeModelTests: XCTestCase {
900900
)
901901
let requestOptions = RequestOptions(timeout: expectedTimeout)
902902
model = GenerativeModel(
903-
name: testModelResourceName,
903+
modelResourceName: testModelResourceName,
904904
firebaseInfo: testFirebaseInfo(),
905905
apiConfig: apiConfig,
906906
tools: nil,
@@ -1204,7 +1204,7 @@ final class GenerativeModelTests: XCTestCase {
12041204
func testGenerateContentStream_appCheck_validToken() async throws {
12051205
let appCheckToken = "test-valid-token"
12061206
model = GenerativeModel(
1207-
name: testModelResourceName,
1207+
modelResourceName: testModelResourceName,
12081208
firebaseInfo: testFirebaseInfo(appCheck: AppCheckInteropFake(token: appCheckToken)),
12091209
apiConfig: apiConfig,
12101210
tools: nil,
@@ -1225,7 +1225,7 @@ final class GenerativeModelTests: XCTestCase {
12251225

12261226
func testGenerateContentStream_appCheck_tokenRefreshError() async throws {
12271227
model = GenerativeModel(
1228-
name: testModelResourceName,
1228+
modelResourceName: testModelResourceName,
12291229
firebaseInfo: testFirebaseInfo(appCheck: AppCheckInteropFake(error: AppCheckErrorFake())),
12301230
apiConfig: apiConfig,
12311231
tools: nil,
@@ -1375,7 +1375,7 @@ final class GenerativeModelTests: XCTestCase {
13751375
)
13761376
let requestOptions = RequestOptions(timeout: expectedTimeout)
13771377
model = GenerativeModel(
1378-
name: testModelResourceName,
1378+
modelResourceName: testModelResourceName,
13791379
firebaseInfo: testFirebaseInfo(),
13801380
apiConfig: apiConfig,
13811381
tools: nil,
@@ -1451,7 +1451,7 @@ final class GenerativeModelTests: XCTestCase {
14511451
parts: "You are a calculator. Use the provided tools."
14521452
)
14531453
model = GenerativeModel(
1454-
name: testModelResourceName,
1454+
modelResourceName: testModelResourceName,
14551455
firebaseInfo: testFirebaseInfo(),
14561456
apiConfig: apiConfig,
14571457
generationConfig: generationConfig,
@@ -1511,7 +1511,7 @@ final class GenerativeModelTests: XCTestCase {
15111511
)
15121512
let requestOptions = RequestOptions(timeout: expectedTimeout)
15131513
model = GenerativeModel(
1514-
name: testModelResourceName,
1514+
modelResourceName: testModelResourceName,
15151515
firebaseInfo: testFirebaseInfo(),
15161516
apiConfig: apiConfig,
15171517
tools: nil,

0 commit comments

Comments
 (0)