コード例 #1
0
        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);
        }
コード例 #2
0
        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>();
            }
        }
コード例 #3
0
        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>();
            }
        }