Exemplo n.º 1
0
            public void CopiesAllValues()
            {
                var minimalClaim = new Claim("t1", "v1", "vt", "i", "oi");

                ClaimDataRecordV2 actual = null;
                Action            act    = () => actual = ClaimDataRecordV2.FromClaim(minimalClaim);

                act.Should().NotThrow();

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

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

                ClaimDataRecordV2 actual = null;
                Action            act    = () => actual = ClaimDataRecordV2.FromClaim(minimalClaim);

                act.Should().NotThrow();

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

                actual.Should().BeEquivalentTo(expected);
            }
Exemplo n.º 3
0
 public ClaimDataRecordTests()
 {
     _sut = new ClaimDataRecordV2();
 }
Exemplo n.º 4
0
            public void GivenNullClaim_ThrowsArgumentNullException()
            {
                Action act = () => ClaimDataRecordV2.FromClaim(null);

                act.Should().Throw <ArgumentNullException>();
            }