@@ -9,11 +9,11 @@ use std::sync::Arc;
9
9
use url:: Url ;
10
10
11
11
pub trait AsEntityClient < RK : Into < String > > {
12
- fn as_entity_client ( & self , row_key : RK ) -> azure_core:: Result < Arc < EntityClient > > ;
12
+ fn entity_client ( & self , row_key : RK ) -> azure_core:: Result < Arc < EntityClient > > ;
13
13
}
14
14
15
15
impl < RK : Into < String > > AsEntityClient < RK > for Arc < PartitionKeyClient > {
16
- fn as_entity_client ( & self , row_key : RK ) -> azure_core:: Result < Arc < EntityClient > > {
16
+ fn entity_client ( & self , row_key : RK ) -> azure_core:: Result < Arc < EntityClient > > {
17
17
EntityClient :: new ( self . clone ( ) , row_key)
18
18
}
19
19
}
@@ -137,17 +137,17 @@ mod integration_tests {
137
137
}
138
138
139
139
fn get_emulator_client ( ) -> Arc < TableServiceClient > {
140
- let storage_account = StorageAccountClient :: new_emulator_default ( ) . as_storage_client ( ) ;
140
+ let storage_account = StorageAccountClient :: new_emulator_default ( ) . storage_client ( ) ;
141
141
storage_account
142
- . as_table_service_client ( )
142
+ . table_service_client ( )
143
143
. expect ( "a table service client" )
144
144
}
145
145
146
146
#[ tokio:: test]
147
147
async fn test_update ( ) {
148
148
let table_client = get_emulator_client ( ) ;
149
149
150
- let table = table_client. as_table_client ( "EntityClientUpdate" ) ;
150
+ let table = table_client. table_client ( "EntityClientUpdate" ) ;
151
151
152
152
println ! ( "Delete the table (if it exists)" ) ;
153
153
match table. delete ( ) . execute ( ) . await {
@@ -168,8 +168,8 @@ mod integration_tests {
168
168
} ;
169
169
170
170
let entity_client = table
171
- . as_partition_key_client ( & entity. city )
172
- . as_entity_client ( & entity. surname )
171
+ . partition_key_client ( & entity. city )
172
+ . entity_client ( & entity. surname )
173
173
. expect ( "an entity client" ) ;
174
174
175
175
entity_client
@@ -199,7 +199,7 @@ mod integration_tests {
199
199
async fn test_merge ( ) {
200
200
let table_client = get_emulator_client ( ) ;
201
201
202
- let table = table_client. as_table_client ( "EntityClientMerge" ) ;
202
+ let table = table_client. table_client ( "EntityClientMerge" ) ;
203
203
204
204
println ! ( "Delete the table (if it exists)" ) ;
205
205
match table. delete ( ) . execute ( ) . await {
@@ -226,8 +226,8 @@ mod integration_tests {
226
226
} ;
227
227
228
228
let entity_client = table
229
- . as_partition_key_client ( & entity. city )
230
- . as_entity_client ( & entity. surname )
229
+ . partition_key_client ( & entity. city )
230
+ . entity_client ( & entity. surname )
231
231
. expect ( "an entity client" ) ;
232
232
233
233
entity_client
@@ -257,7 +257,7 @@ mod integration_tests {
257
257
async fn test_insert_or_replace ( ) {
258
258
let table_client = get_emulator_client ( ) ;
259
259
260
- let table = table_client. as_table_client ( "EntityClientInsertOrReplace" ) ;
260
+ let table = table_client. table_client ( "EntityClientInsertOrReplace" ) ;
261
261
262
262
println ! ( "Delete the table (if it exists)" ) ;
263
263
match table. delete ( ) . execute ( ) . await {
@@ -278,8 +278,8 @@ mod integration_tests {
278
278
} ;
279
279
280
280
let entity_client = table
281
- . as_partition_key_client ( & entity. city )
282
- . as_entity_client ( & entity. surname )
281
+ . partition_key_client ( & entity. city )
282
+ . entity_client ( & entity. surname )
283
283
. expect ( "an entity client" ) ;
284
284
entity_client
285
285
. insert_or_replace ( )
@@ -303,7 +303,7 @@ mod integration_tests {
303
303
async fn test_insert_or_merge ( ) {
304
304
let table_client = get_emulator_client ( ) ;
305
305
306
- let table = table_client. as_table_client ( "EntityClientInsertOrMerge" ) ;
306
+ let table = table_client. table_client ( "EntityClientInsertOrMerge" ) ;
307
307
308
308
println ! ( "Delete the table (if it exists)" ) ;
309
309
match table. delete ( ) . execute ( ) . await {
@@ -324,8 +324,8 @@ mod integration_tests {
324
324
} ;
325
325
326
326
let entity_client = table
327
- . as_partition_key_client ( & entity. city )
328
- . as_entity_client ( & entity. surname )
327
+ . partition_key_client ( & entity. city )
328
+ . entity_client ( & entity. surname )
329
329
. expect ( "an entity client" ) ;
330
330
entity_client
331
331
. insert_or_merge ( )
0 commit comments