コード例 #1
0
        public async Task SignInNull()
        {
            ITicketManager ticket = new TicketManagerInMemory(DefaultCulture);

            await ticket.SignInAsync(null);

            ticket.User.Should().BeNull();
            ticket.Culture.Should().Be(DefaultCulture);
            ticket.IsAuthenticated.Should().Be(false);
            ticket.UserKey.Should().Be(Guid.Empty);
        }
コード例 #2
0
        public async Task SignStatusFailExternal()
        {
            ITicketManager ticket = new TicketManagerInMemory(DefaultCulture);

            await ticket.SignInAsync(new TicketEntity { Culture = "en-CA", Key = "1".ToGuid(), Name = "Marvio André", Status = TicketStatus.FailExternal });

            ticket.User.Should().BeNull();
            ticket.Culture.Should().Be(DefaultCulture);
            ticket.IsAuthenticated.Should().Be(false);
            ticket.UserKey.Should().Be(Guid.Empty);
        }
コード例 #3
0
        public async Task SignIn()
        {
            ITicketManager ticket = new TicketManagerInMemory(DefaultCulture);

            await ticket.SignInAsync(new TicketEntity { Culture = "en-CA", Key = "1".ToGuid(), Name = "Marvio André", Status = TicketStatus.Sucess });

            ticket.User.Should().NotBeNull();
            ticket.Culture.Should().Be("en-CA");
            ticket.IsAuthenticated.Should().Be(true);
            ticket.UserKey.Should().Be("1".ToGuid());
        }