-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathGetAllFolders.cs
More file actions
28 lines (25 loc) · 930 Bytes
/
GetAllFolders.cs
File metadata and controls
28 lines (25 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SignNow.Net.Model;
namespace SignNow.Net.Examples
{
public partial class FolderExamples
{
[TestMethod]
public async Task GetAllFoldersAsync()
{
// get all folders
var folders = await testContext.Folders
.GetAllFoldersAsync()
.ConfigureAwait(false);
// check if the root folder contains the default folders
Assert.IsInstanceOfType(folders, typeof(SignNowFolders));
Assert.AreEqual("Root", folders.Name);
Assert.IsTrue(folders.SystemFolder);
Assert.IsTrue(folders.Folders.Any(f => f.Name == "Documents"));
Assert.IsTrue(folders.Folders.Any(f => f.Name == "Archive"));
Assert.IsTrue(folders.Folders.Any(f => f.Name == "Templates"));
}
}
}