You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chinchilla.ClickUp.Tests/ClickUpApiTests.cs
+83-4Lines changed: 83 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -254,8 +254,8 @@ public void ShouldGetSpaceFolders()
254
254
Assert.Fail($"The Test Method of '{methodName}' generate an error with status: {response.RequestStatus} and response: {response.ResponseError.Err}");
255
255
else
256
256
{
257
-
Assert.That(response.ResponseSuccess.Folders.Count==1,$"The Response of the request through the method '{methodName}' did not return one space!");
258
-
Assert.That(response.ResponseSuccess.Folders.Single().Lists.Count>2,$"The Response of the request through the method '{methodName}' returned a space without at least two lists!");
257
+
Assert.That(response.ResponseSuccess.Folders.Count>1,$"The Response of the request through the method '{methodName}' did not return one space!");
258
+
Assert.That(response.ResponseSuccess.Folders.Any(x =>x.Lists.Count>2),$"The Response of the request through the method '{methodName}' returned a space but without at least two lists!");
Assert.Fail($"The Test Method of '{methodName}' generate exception: {ex.Message}");// Always return false
596
+
}
597
+
if(response!=null)
598
+
{
599
+
Assert.That(response.ResponseSuccess!=null||response.ResponseError!=null,$"The ResponseSuccess and the ResponseError of the GenericResponse of the request through the method '{methodName}' are null!");// Always return false
600
+
if(response.ResponseError!=null)
601
+
Assert.Fail($"The Test Method of '{methodName}' generate an error with status: {response.RequestStatus} and response: {response.ResponseError.Err}");
602
+
else
603
+
{
604
+
Assert.That(response.ResponseSuccess.Webhook.Endpoint==endpoint,$"The Response of the request through the method '{methodName}' did not return a new webhook with the same name!");
605
+
}
606
+
}
607
+
else
608
+
{
609
+
Assert.Fail($"The Response of the request through the method '{methodName}' is null!");
610
+
}
611
+
}
612
+
575
613
#endregion
576
614
577
615
@@ -834,8 +872,8 @@ public void ShouldGetSpaceFoldersAsync()
834
872
Assert.Fail($"The Test Method of '{methodName}' generate an error with status: {response.RequestStatus} and response: {response.ResponseError.Err}");
835
873
else
836
874
{
837
-
Assert.That(response.ResponseSuccess.Folders.Count==1,$"The Response of the request through the method '{methodName}' did not return one space!");
838
-
Assert.That(response.ResponseSuccess.Folders.Single().Lists.Count>2,$"The Response of the request through the method '{methodName}' returned a space without at least two lists!");
875
+
Assert.That(response.ResponseSuccess.Folders.Count>1,$"The Response of the request through the method '{methodName}' did not return one space!");
876
+
Assert.That(response.ResponseSuccess.Folders.Any(x =>x.Lists.Count>2),$"The Response of the request through the method '{methodName}' returned a space but without at least two lists!");
839
877
}
840
878
}
841
879
else
@@ -1135,6 +1173,47 @@ public void ShouldEditTaskAsync()
Assert.Fail($"The Test Method of '{methodName}' generate exception: {ex.Message}");// Always return false
1200
+
}
1201
+
if(response!=null)
1202
+
{
1203
+
Assert.That(response.ResponseSuccess!=null||response.ResponseError!=null,$"The ResponseSuccess and the ResponseError of the GenericResponse of the request through the method '{methodName}' are null!");// Always return false
1204
+
if(response.ResponseError!=null)
1205
+
Assert.Fail($"The Test Method of '{methodName}' generate an error with status: {response.RequestStatus} and response: {response.ResponseError.Err}");
1206
+
else
1207
+
{
1208
+
Assert.That(response.ResponseSuccess.Webhook.Endpoint==endpoint,$"The Response of the request through the method '{methodName}' did not return a new webhook with the same name!");
1209
+
}
1210
+
}
1211
+
else
1212
+
{
1213
+
Assert.Fail($"The Response of the request through the method '{methodName}' is null!");
0 commit comments