예제 #1
0
        public void DefaultTicket()
        {
            ITicketManager ticket = new TicketManagerInMemory(DefaultCulture);

            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 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);
        }
예제 #4
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());
        }