Пример #1
0
        public async Task GetOne_GetsProjectObject(ProjectSyncanoClient client)
        {
            //when
            var project = await client.GetOne(TestData.ProjectId);

            //then
            project.Id.ShouldEqual(TestData.ProjectId);
            project.Name.ShouldEqual(TestData.ProjectName);
            project.Name.ShouldNotBeNull();
        }
Пример #2
0
        public async Task GetOne_WithInvalidProjectId_ThrowsException(ProjectSyncanoClient client)
        {
            try
            {
                //when
                await client.GetOne("abcde");

                throw new Exception("GetOne should throw an exception");
            }
            catch (Exception e)
            {
                //then
                e.ShouldBeType <SyncanoException>();
            }
        }
Пример #3
0
        public async Task GetOne_WithoutProjectId_ThrowsException(ProjectSyncanoClient client)
        {
            try
            {
                //when
                await client.GetOne(null);

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