337 references to GetProperty
aspire (10)
Aspire.Cli.Tests (37)
Aspire.Hosting (4)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.Maui (1)
Aspire.Hosting.PostgreSQL.Tests (33)
AddPostgresTests.cs (33)
486var servers = document.RootElement.GetProperty("Servers");
489Assert.Equal(pg1.Resource.Name, servers.GetProperty("1").GetProperty("Name").GetString());
490Assert.Equal("Servers", servers.GetProperty("1").GetProperty("Group").GetString());
491Assert.Equal("mypostgres1", servers.GetProperty("1").GetProperty("Host").GetString());
492Assert.Equal(5432, servers.GetProperty("1").GetProperty("Port").GetInt32());
493Assert.Equal("postgres", servers.GetProperty("1").GetProperty("Username").GetString());
494Assert.Equal("prefer", servers.GetProperty("1").GetProperty("SSLMode").GetString());
495Assert.Equal("postgres", servers.GetProperty("1").GetProperty("MaintenanceDB").GetString());
497Assert.Equal($"echo '{pg1.Resource.PasswordParameter.Value}'", servers.GetProperty("1").GetProperty("PasswordExecCommand").GetString());
501Assert.Equal(pg2.Resource.Name, servers.GetProperty("2").GetProperty("Name").GetString());
502Assert.Equal("Servers", servers.GetProperty("2").GetProperty("Group").GetString());
503Assert.Equal("mypostgres2", servers.GetProperty("2").GetProperty("Host").GetString());
504Assert.Equal(5432, servers.GetProperty("2").GetProperty("Port").GetInt32());
505Assert.Equal("myuser", servers.GetProperty("2").GetProperty("Username").GetString());
506Assert.Equal("prefer", servers.GetProperty("2").GetProperty("SSLMode").GetString());
507Assert.Equal("postgres", servers.GetProperty("2").GetProperty("MaintenanceDB").GetString());
509Assert.Equal($"echo '{pg2.Resource.PasswordParameter.Value}'", servers.GetProperty("2").GetProperty("PasswordExecCommand").GetString());
Aspire.Hosting.Seq.Tests (4)
Aspire.Hosting.Tests (41)
Diagnostics.FunctionalTests (11)
dotnet-openapi (1)
JwtBearerSample (1)
Microsoft.AspNetCore.Authentication.Test (8)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (54)
ServerStreamingServerCallHandlerTests.cs (10)
69Assert.Equal("Hello TestName! 1", responseJson1.RootElement.GetProperty("message").GetString());
76Assert.Equal("Hello TestName! 2", responseJson2.RootElement.GetProperty("message").GetString());
113Assert.Equal("Hello TestName! 1", responseJson1.RootElement.GetProperty("message").GetString());
117Assert.Equal("Exception was thrown by handler.", responseJson2.RootElement.GetProperty("message").GetString());
118Assert.Equal(2, responseJson2.RootElement.GetProperty("code").GetInt32());
155Assert.Equal("Hello TestName! 1", responseJson1.RootElement.GetProperty("message").GetString());
159Assert.Equal("Detail!", responseJson2.RootElement.GetProperty("message").GetString());
160Assert.Equal((int)StatusCode.Aborted, responseJson2.RootElement.GetProperty("code").GetInt32());
196Assert.Equal("Exception was thrown by handler. Exception: Exception!", responseJson.RootElement.GetProperty("message").GetString());
197Assert.Equal(2, responseJson.RootElement.GetProperty("code").GetInt32());
UnaryServerCallHandlerTests.cs (44)
83Assert.Equal("Hello TestName!", responseJson.RootElement.GetProperty("message").GetString());
718Assert.Equal("", responseJson.RootElement.GetProperty("message").GetString());
750Assert.Equal(expectedError, responseJson.RootElement.GetProperty("message").GetString());
751Assert.Equal((int)StatusCode.InvalidArgument, responseJson.RootElement.GetProperty("code").GetInt32());
788Assert.Equal(expectedError, responseJson.RootElement.GetProperty("message").GetString());
789Assert.Equal((int)StatusCode.InvalidArgument, responseJson.RootElement.GetProperty("code").GetInt32());
818Assert.Equal(expectedError, responseJson.RootElement.GetProperty("message").GetString());
819Assert.Equal((int)StatusCode.InvalidArgument, responseJson.RootElement.GetProperty("code").GetInt32());
842Assert.Equal("Detail!", responseJson.RootElement.GetProperty("message").GetString());
843Assert.Equal((int)StatusCode.Unauthenticated, responseJson.RootElement.GetProperty("code").GetInt32());
867Assert.Equal("Detail!", responseJson.RootElement.GetProperty("message").GetString());
868Assert.Equal((int)StatusCode.Unauthenticated, responseJson.RootElement.GetProperty("code").GetInt32());
934Assert.Equal(123, responseJson.RootElement.GetProperty("code").GetInt32());
935Assert.Equal("This is a message", responseJson.RootElement.GetProperty("message").GetString());
937var details = responseJson.RootElement.GetProperty("details").EnumerateArray().ToArray();
941Assert.Equal("type.googleapis.com/google.rpc.DebugInfo", d.GetProperty("@type").GetString());
942Assert.Equal("This is some debugging information", d.GetProperty("detail").GetString());
946Assert.Equal("type.googleapis.com/google.rpc.RequestInfo", d.GetProperty("@type").GetString());
947Assert.Equal("request-id", d.GetProperty("requestId").GetString());
951Assert.Equal("type.googleapis.com/google.rpc.BadRequest", d.GetProperty("@type").GetString());
952Assert.Equal(1, d.GetProperty("fieldViolations").GetArrayLength());
1012Assert.Equal(123, responseJson.RootElement.GetProperty("code").GetInt32());
1013Assert.Equal("This is a message", responseJson.RootElement.GetProperty("message").GetString());
1015var details = responseJson.RootElement.GetProperty("details").EnumerateArray().ToArray();
1019Assert.Equal("type.googleapis.com/google.rpc.DebugInfo", d.GetProperty("@type").GetString());
1020Assert.Equal("This is some debugging information", d.GetProperty("detail").GetString());
1024Assert.Equal("type.googleapis.com/google.rpc.RequestInfo", d.GetProperty("@type").GetString());
1025Assert.Equal("request-id", d.GetProperty("requestId").GetString());
1029Assert.Equal("type.googleapis.com/google.rpc.BadRequest", d.GetProperty("@type").GetString());
1030Assert.Equal(1, d.GetProperty("fieldViolations").GetArrayLength());
1054Assert.Equal("Exception was thrown by handler.", responseJson.RootElement.GetProperty("message").GetString());
1055Assert.Equal((int)StatusCode.Unknown, responseJson.RootElement.GetProperty("code").GetInt32());
1084Assert.Equal("Exception was thrown by handler. InvalidOperationException: Error!", responseJson.RootElement.GetProperty("message").GetString());
1085Assert.Equal((int)StatusCode.Unknown, responseJson.RootElement.GetProperty("code").GetInt32());
1113Assert.Equal(@"Detail!", responseJson.RootElement.GetProperty("message").GetString());
1114Assert.Equal((int)StatusCode.Unauthenticated, responseJson.RootElement.GetProperty("code").GetInt32());
1156Assert.Equal(@"Hello World!", responseJson.RootElement.GetProperty("message").GetString());
1210Assert.Equal($"Hello {requestContent.Length}!", responseJson.RootElement.GetProperty("message").GetString());
1237Assert.Equal("Unable to deserialize null to Int32Value.", responseJson.RootElement.GetProperty("message").GetString());
1476Assert.Equal("Exception was thrown by handler.", responseJson.RootElement.GetProperty("message").GetString());
1477Assert.Equal((int)StatusCode.Unknown, responseJson.RootElement.GetProperty("code").GetInt32());
1738var anyMessage = responseJson.RootElement.GetProperty("anyMessage");
1739Assert.Equal("type.googleapis.com/google.protobuf.StringValue", anyMessage.GetProperty("@type").GetString());
1740Assert.Equal("A value!", anyMessage.GetProperty("value").GetString());
Microsoft.AspNetCore.Http.Abstractions.Tests (10)
Microsoft.AspNetCore.Identity.FunctionalTests (74)
MapIdentityApiTests.cs (74)
119var tokenType = loginContent.GetProperty("tokenType").GetString();
120var accessToken = loginContent.GetProperty("accessToken").GetString();
121var expiresIn = loginContent.GetProperty("expiresIn").GetDouble();
151var tokenType = loginContent.GetProperty("token_type").GetString();
152var accessToken = loginContent.GetProperty("access_token").GetString();
153var expiresIn = loginContent.GetProperty("expires_in").GetDouble();
186var accessToken = loginContent.GetProperty("accessToken").GetString();
187var expiresIn = loginContent.GetProperty("expiresIn").GetDouble();
265var accessToken = loginContent.GetProperty("accessToken").GetString();
300var refreshToken = loginContent.GetProperty("refreshToken").GetString();
304var accessToken = refreshContent.GetProperty("accessToken").GetString();
346var refreshToken = loginContent.GetProperty("refreshToken").GetString();
347var accessToken = loginContent.GetProperty("refreshToken").GetString();
370refreshToken = refreshContent.GetProperty("refreshToken").GetString();
374accessToken = refreshContent.GetProperty("accessToken").GetString();
419var accessToken = refreshContent.GetProperty("accessToken").GetString();
676var accessToken = loginContent.GetProperty("accessToken").GetString();
677var refreshToken = loginContent.GetProperty("refreshToken").GetString();
695Assert.False(twoFactorKeyContent.GetProperty("isTwoFactorEnabled").GetBoolean());
696Assert.False(twoFactorKeyContent.GetProperty("isMachineRemembered").GetBoolean());
698var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
707Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
708Assert.False(enable2faContent.GetProperty("isMachineRemembered").GetBoolean());
734var accessToken = loginContent.GetProperty("accessToken").GetString();
739var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
748Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
750var recoveryCodes = enable2faContent.GetProperty("recoveryCodes").EnumerateArray().Select(e => e.GetString()).ToArray();
761var recoveryAccessToken = recoveryLoginContent.GetProperty("accessToken").GetString();
768Assert.False(disable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
786var accessToken = loginContent.GetProperty("accessToken").GetString();
791var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
803Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
807Assert.False(resetKeyContent.GetProperty("isTwoFactorEnabled").GetBoolean());
809var resetSharedKey = resetKeyContent.GetProperty("sharedKey").GetString();
820Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
833var accessToken = loginContent.GetProperty("accessToken").GetString();
838var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
847var recoveryCodes = enable2faContent.GetProperty("recoveryCodes").EnumerateArray().Select(e => e.GetString()).ToArray();
848Assert.Equal(10, enable2faContent.GetProperty("recoveryCodesLeft").GetInt32());
863var recoveryAccessToken = recoveryLoginContent.GetProperty("accessToken").GetString();
870Assert.Equal(8, updated2faContent.GetProperty("recoveryCodesLeft").GetInt32());
871Assert.Null(updated2faContent.GetProperty("recoveryCodes").GetString());
878var resetRecoveryCodes = resetRecoveryContent.GetProperty("recoveryCodes").EnumerateArray().Select(e => e.GetString()).ToArray();
879Assert.Equal(10, resetRecoveryContent.GetProperty("recoveryCodesLeft").GetInt32());
904Assert.False(twoFactorKeyContent.GetProperty("isTwoFactorEnabled").GetBoolean());
905Assert.False(twoFactorKeyContent.GetProperty("isMachineRemembered").GetBoolean());
907var sharedKey = twoFactorKeyContent.GetProperty("sharedKey").GetString();
916Assert.True(enable2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
917Assert.False(enable2faContent.GetProperty("isMachineRemembered").GetBoolean());
928Assert.True(session2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
929Assert.False(session2faContent.GetProperty("isMachineRemembered").GetBoolean());
937Assert.True(session2faContent2.GetProperty("isTwoFactorEnabled").GetBoolean());
938Assert.False(session2faContent2.GetProperty("isMachineRemembered").GetBoolean());
946Assert.True(persistent2faContent.GetProperty("isTwoFactorEnabled").GetBoolean());
947Assert.True(persistent2faContent.GetProperty("isMachineRemembered").GetBoolean());
1043Assert.Equal(Email, infoResponse.GetProperty("email").GetString());
1044Assert.True(infoResponse.GetProperty("isEmailConfirmed").GetBoolean());
1061Assert.Equal(Email, infoPostContent.GetProperty("email").GetString());
1062Assert.True(infoPostContent.GetProperty("isEmailConfirmed").GetBoolean());
1088Assert.Equal(newEmail, infoAfterEmailChange.GetProperty("email").GetString());
1103Assert.Equal(newEmail, infoAfterFinalLogin.GetProperty("email").GetString());
1104Assert.True(infoAfterFinalLogin.GetProperty("isEmailConfirmed").GetBoolean());
1139Assert.Equal(Email, infoResponse.GetProperty("email").GetString());
1155Assert.Equal(Email, infoPostContent.GetProperty("email").GetString());
1177Assert.Equal(newEmail, infoAfterEmailChange.GetProperty("email").GetString());
1189Assert.Equal(newEmail, infoAfterFinalLogin.GetProperty("email").GetString());
1254Assert.Equal(Email, infoPostContent.GetProperty("email").GetString());
1255Assert.False(infoPostContent.GetProperty("isEmailConfirmed").GetBoolean());
1273Assert.Equal(newEmail, infoGetContent.GetProperty("email").GetString());
1274Assert.True(infoGetContent.GetProperty("isEmailConfirmed").GetBoolean());
1397=> claims.EnumerateArray().Single(e => e.GetProperty("type").GetString() == name).GetProperty("value").GetString();
1437var accessToken = loginContent.GetProperty("accessToken").GetString();
1438var refreshToken = loginContent.GetProperty("refreshToken").GetString();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.Evaluation.Safety (5)
Microsoft.Extensions.AI.OpenAI.Tests (5)
Negotiate.Client (4)
Templates.Blazor.Tests (4)
Templates.Blazor.WebAssembly.Auth.Tests (3)
Templates.Blazor.WebAssembly.Tests (3)
Templates.Mvc.Tests (3)
Templates.Tests (3)