Ejemplo n.º 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();
        }
Ejemplo n.º 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>();
            }
        }
Ejemplo n.º 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>();
            }
        }