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(); }
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>(); } }
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>(); } }