60 references to Assert
InteropClient (60)
InteropClient.cs (59)
191Assert.IsTrue(googleCredential.IsCreateScopedRequired);
198Assert.IsFalse(googleCredential.IsCreateScopedRequired);
289Assert.IsNotNull(response);
303Assert.AreEqual(314159, response.Payload.Body.Length);
318Assert.AreEqual(74922, response.AggregatedPayloadSize);
354Assert.IsTrue(await call.ResponseStream.MoveNext());
355Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length);
363Assert.IsTrue(await call.ResponseStream.MoveNext());
364Assert.AreEqual(9, call.ResponseStream.Current.Payload.Body.Length);
372Assert.IsTrue(await call.ResponseStream.MoveNext());
373Assert.AreEqual(2653, call.ResponseStream.Current.Payload.Body.Length);
381Assert.IsTrue(await call.ResponseStream.MoveNext());
382Assert.AreEqual(58979, call.ResponseStream.Current.Payload.Body.Length);
386Assert.IsFalse(await call.ResponseStream.MoveNext());
399Assert.AreEqual(0, responseList.Count);
419Assert.AreEqual(314159, response.Payload.Body.Length);
420Assert.IsFalse(string.IsNullOrEmpty(response.OauthScope));
421Assert.IsTrue(oauthScope.Contains(response.OauthScope));
422Assert.AreEqual(defaultServiceAccount, response.Username);
440Assert.AreEqual(314159, response.Payload.Body.Length);
441Assert.AreEqual(GetEmailFromServiceAccountFile(), response.Username);
460Assert.IsFalse(string.IsNullOrEmpty(response.OauthScope));
461Assert.IsTrue(oauthScope.Contains(response.OauthScope));
462Assert.AreEqual(GetEmailFromServiceAccountFile(), response.Username);
479Assert.AreEqual(GetEmailFromServiceAccountFile(), response.Username);
494var ex = await Assert.ThrowsAsync<RpcException>(() => call.ResponseAsync);
495Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode);
513Assert.IsTrue(await call.ResponseStream.MoveNext());
514Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length);
522Assert.Fail();
526Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode);
555Assert.Fail();
559Assert.AreEqual(StatusCode.DeadlineExceeded, ex.StatusCode);
582Assert.AreEqual("test_initial_metadata_value", responseHeaders.First((entry) => entry.Key == "x-grpc-test-echo-initial").Value);
603Assert.AreEqual("test_initial_metadata_value", responseHeaders.First((entry) => entry.Key == "x-grpc-test-echo-initial").Value);
623var e = Assert.Throws<RpcException>(() => client.UnaryCall(request));
624Assert.AreEqual(StatusCode.Unknown, e.Status.StatusCode);
625Assert.AreEqual(echoStatus.Message, e.Status.Detail);
640Assert.Fail();
644Assert.AreEqual(StatusCode.Unknown, e.Status.StatusCode);
645Assert.AreEqual(echoStatus.Message, e.Status.Detail);
668Assert.Fail();
672Assert.AreEqual(StatusCode.Unknown, e.Status.StatusCode);
673Assert.AreEqual(echoStatus.Message, e.Status.Detail);
682var e = Assert.Throws<RpcException>(() => client.UnimplementedCall(new Empty()));
684Assert.AreEqual(StatusCode.Unimplemented, e.Status.StatusCode);
691var e = Assert.Throws<RpcException>(() => client.UnimplementedCall(new Empty()));
693Assert.AreEqual(StatusCode.Unimplemented, e.Status.StatusCode);
709var e = Assert.Throws<RpcException>(() => client.UnaryCall(probeRequest, CreateClientCompressionMetadata(false)));
710Assert.AreEqual(StatusCode.InvalidArgument, e.Status.StatusCode);
722Assert.AreEqual(314159, response1.Payload.Body.Length);
734Assert.AreEqual(314159, response2.Payload.Body.Length);
756Assert.Fail();
760Assert.AreEqual(StatusCode.InvalidArgument, e.Status.StatusCode);
785Assert.AreEqual(73086, response.AggregatedPayloadSize);
803Assert.AreEqual(314159, response.Payload.Body.Length);
814Assert.AreEqual(314159, response.Payload.Body.Length);
858Assert.IsNotNull(keyFile);
861Assert.IsTrue(email.Length > 0); // spec requires nonempty client email.