public async Task GetOne_ByCollectionKey(FolderSyncanoClient client) { //when var folder = await client.GetOne(TestData.ProjectId, TestData.FolderName, collectionKey : TestData.CollectionKey); //then folder.Id.ShouldEqual(TestData.FolderId); folder.Name.ShouldEqual(TestData.FolderName); }
public async Task GetOne_WithInvalidFolderName_ThrowsException(FolderSyncanoClient client) { try { //when await client.GetOne(TestData.ProjectId, "abcde", TestData.CollectionId); throw new Exception("GetOne should throw an exception"); } catch (Exception e) { //then e.ShouldBeType <SyncanoException>(); } }
public async Task GetOne_WithNullProjectId_ThrowsException(FolderSyncanoClient client) { try { //when await client.GetOne(null, TestData.FolderName, TestData.CollectionId); throw new Exception("GetOne should throw an exception"); } catch (Exception e) { //then e.ShouldBeType <ArgumentNullException>(); } }