internal static void TestBearerTokenWithPartitionV3(Scope scope, string expectedToken, string partition, string user) { TestScope(scope, ScopeTypes.BearerTokenWithPartition); Assert.True(scope is BearerTokenWithPartition); BearerTokenWithPartition token = scope as BearerTokenWithPartition; Assert.Equal(expectedToken, token.Token); Assert.Equal(partition, token.Partition); Assert.Equal(user, token.UserId); }
public void BearerTokenWithPartitionSerialization() { BearerTokenWithPartition constScope = JsonConvert.DeserializeObject <Scope>(BEARERTOKEN_WITH_PARTITION) as BearerTokenWithPartition; BearerTokenWithPartition scope = new BearerTokenWithPartition("some-access-token", "Room101", "some-user-id"); //Context check Assert.Equal(constScope.Type, scope.Type); Assert.Equal(constScope.Token, scope.Token); Assert.Equal(constScope.UserId, scope.UserId); Assert.Equal(constScope.Partition, scope.Partition); }