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