Ejemplo n.º 1
0
        public void ShouldGetFolderAsync()
        {
            // Arrange
            IFilesApi filesApi = CreateFilesApi();

            // Act
            FolderResponse folder = filesApi.GetFolderAsync("applications", "calendar", ListingFlags.IncludeEverything).Result;

            // Assert
            folder.ShouldNotBe(null);
            folder.name.ShouldBe("calendar");
            folder.folder.Count.ShouldBe(2);
            folder.file.Count.ShouldBe(6);
        }
Ejemplo n.º 2
0
        public void ShouldGetFolderAsync()
        {
            // Arrange
            IFilesApi filesApi = CreateFilesApi();

            // Act
            FolderResponse folder = filesApi.GetFolderAsync("calendar", ListingFlags.IncludeEverything).Result;

            // Assert
            folder.ShouldNotBe(null);
            folder.Name.ShouldBe("calendar");
            folder.Folder.Count.ShouldBe(2);
            folder.File.Count.ShouldBe(6);

            Should.Throw <ArgumentNullException>(() => filesApi.GetFolderAsync(null, ListingFlags.IncludeEverything));
        }