1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // https://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ using DriveV2Snippets ;
16
+ using NUnit . Framework ;
17
+
18
+ namespace DriveV2SnippetsTest
19
+ {
20
+ // Unit testcase for drive v2 share file snippet
21
+ [ TestFixture ]
22
+ public class ShareFileTest : BaseTest
23
+ {
24
+ //TODO(developer) - Provide absolute path of the file
25
+ private string filePath = "files/photo.jpg" ;
26
+
27
+ [ Test ]
28
+ public void TestShareFile ( )
29
+ {
30
+ String fileId = CreateTestBlob ( filePath ) ;
31
+ var ids = ShareFile . DriveShareFile ( fileId ,
32
+ "user@test.appsdevtesting.com" ,
33
+ "test.appsdevtesting.com" ) ;
34
+ Assert . AreNotEqual ( 0 , ids . Count ) ;
35
+ DeleteFileOnCleanup ( fileId ) ;
36
+ }
37
+ }
38
+ }
0 commit comments