Example #1
0
        public async Task Get_ByCollectionKey(FolderSyncanoClient client)
        {
            //when
            var response = await client.Get(TestData.ProjectId, collectionKey : TestData.CollectionKey);

            //then
            response.ShouldNotBeEmpty();
            response.Any(f => f.Name == TestData.FolderName).ShouldBeTrue();
        }
Example #2
0
        public async Task Get_WithInvalidProjectId_ThrowsException(FolderSyncanoClient client)
        {
            try
            {
                //when
                await client.Get("abcde", TestData.CollectionId);

                throw new Exception("Get should throw an exception");
            }
            catch (Exception e)
            {
                //then
                e.ShouldBeType <SyncanoException>();
            }
        }
Example #3
0
        public async Task Get_WithNullProjectId_ThrowsException(FolderSyncanoClient client)
        {
            try
            {
                //when
                await client.Get(null, TestData.CollectionId);

                throw new Exception("Get should throw an exception");
            }
            catch (Exception e)
            {
                //then
                e.ShouldBeType <ArgumentNullException>();
            }
        }