Ejemplo n.º 1
0
        public void AddProperty_AddsExpectedProperty()
        {
            // Arrange
            var ticket = new AuthenticationTicket(
                new ClaimsIdentity(),
                new AuthenticationProperties());

            // Act
            ticket.AddProperty("property", "value");

            // Assert
            Assert.Equal("value", ticket.GetProperty("property"));
        }
Ejemplo n.º 2
0
        public void RemoveProperty_RemovesProperty()
        {
            // Arrange
            var ticket = new AuthenticationTicket(
                new ClaimsIdentity(),
                new AuthenticationProperties());

            ticket.AddProperty("property", "value");

            // Act
            ticket.RemoveProperty("property");

            // Assert
            Assert.Null(ticket.GetProperty("property"));
        }