Ejemplo n.º 1
0
            public void CopiesAllValues()
            {
                ClaimDataRecord actual = null;
                Action          act    = () => actual = ClaimDataRecord.FromClaim(_clientId, _claim);

                act.Should().NotThrow();

                var expected = new ClaimDataRecord {
                    ClientId       = "c001",
                    Type           = "t1",
                    Value          = "v1",
                    OriginalIssuer = "oi",
                    Issuer         = "i",
                    ValueType      = "vt"
                };

                actual.Should().BeEquivalentTo(expected);
            }
Ejemplo n.º 2
0
            public void GivenMinimalClaim_DoesNotThrow()
            {
                var minimalClaim = new Claim("t1", "v1");

                ClaimDataRecord actual = null;
                Action          act    = () => actual = ClaimDataRecord.FromClaim(_clientId, minimalClaim);

                act.Should().NotThrow();

                var expected = new ClaimDataRecord {
                    ClientId       = "c001",
                    Type           = "t1",
                    Value          = "v1",
                    OriginalIssuer = "LOCAL AUTHORITY",
                    Issuer         = "LOCAL AUTHORITY",
                    ValueType      = "http://www.w3.org/2001/XMLSchema#string"
                };

                actual.Should().BeEquivalentTo(expected);
            }