3030public class CreateCacheTest
3131{
3232 private static TestServerProcess ? _server ;
33- private Client vertexClient ;
33+ private Client enterpriseClient ;
3434 private Client geminiClient ;
3535 private string modelName ;
3636 public TestContext TestContext { get ; set ; }
@@ -60,7 +60,7 @@ public void TestInit()
6060 $ "{ GetType ( ) . Name } .{ TestContext . TestName } " } } ,
6161 BaseUrl = "http://localhost:1453"
6262 } ;
63- var vertexClientHttpOptions = new HttpOptions {
63+ var enterpriseClientHttpOptions = new HttpOptions {
6464 Headers = new Dictionary < string , string > { { "Test-Name" ,
6565 $ "{ GetType ( ) . Name } .{ TestContext . TestName } " } } ,
6666 BaseUrl = "http://localhost:1454"
@@ -71,11 +71,11 @@ public void TestInit()
7171 string location =
7272 System . Environment . GetEnvironmentVariable ( "GOOGLE_CLOUD_LOCATION" ) ?? "us-central1" ;
7373 string apiKey = System . Environment . GetEnvironmentVariable ( "GOOGLE_API_KEY" ) ;
74- vertexClient = new Client ( project : project , location : location , vertexAI : true ,
74+ enterpriseClient = new Client ( project : project , location : location , enterprise : true ,
7575 credential : TestServer . GetCredentialForTestMode ( ) ,
76- httpOptions : vertexClientHttpOptions ) ;
76+ httpOptions : enterpriseClientHttpOptions ) ;
7777 geminiClient =
78- new Client ( apiKey : apiKey , vertexAI : false , httpOptions : geminiClientHttpOptions ) ;
78+ new Client ( apiKey : apiKey , enterprise : false , httpOptions : geminiClientHttpOptions ) ;
7979
8080 // Specific setup for this test class
8181 modelName = "gemini-2.5-flash" ;
@@ -108,7 +108,7 @@ public async Task CreateCacheGcsUriVertexTest()
108108 Ttl = "86400s"
109109 } ;
110110
111- var vertexResponse = await vertexClient . Caches . CreateAsync ( model : modelName , config : config ) ;
111+ var vertexResponse = await enterpriseClient . Caches . CreateAsync ( model : modelName , config : config ) ;
112112
113113 Assert . IsNotNull ( vertexResponse ) ;
114114 Assert . IsNotNull ( vertexResponse . Name ) ;
@@ -186,7 +186,7 @@ public async Task CreateCacheGoogleAiFileVertexTest()
186186 } ;
187187
188188 await Assert . ThrowsExceptionAsync < ServerError > ( async ( ) => {
189- await vertexClient . Caches . CreateAsync ( model : modelName , config : config ) ;
189+ await enterpriseClient . Caches . CreateAsync ( model : modelName , config : config ) ;
190190 } ) ;
191191 }
192192}
0 commit comments