Esempio n. 1
0
        public async Task Constructor_Valid_ShouldNotThrowException()
        {
            var fixtures = new EmployerAccountTeamRepositoryTestFixtures();

            await fixtures.CheckEmployerAccountTeamRepository(repo => Task.CompletedTask);

            Assert.Pass("Did not get an exception");
        }
Esempio n. 2
0
        public Task GetMember_ForNonActiveUser_ShouldExecuteQueryWithoutExecption(InvitationStatus status, int daysUntilExpiry)
        {
            // Arrange
            string email = $"{Guid.NewGuid().ToString()}@foo.com";

            var fixtures = new EmployerAccountTeamRepositoryTestFixtures()
                           .WithInvitation(status, DateTime.Now.AddDays(daysUntilExpiry), email, out var hashedId);

            return(fixtures.CheckEmployerAccountTeamRepository(async repo =>
            {
                var member = await repo.GetMember(hashedId, email, true);
                Assert.IsNull(member);
            }));
        }
Esempio n. 3
0
        public Task GetMember_ForActiveUser_ShouldExecuteQueryWithoutExecption()
        {
            // Arrange
            string email = $"{Guid.NewGuid().ToString()}@foo.com";

            var fixtures = new EmployerAccountTeamRepositoryTestFixtures()
                           .WithNewAccountAndActiveUser(email, Role.Owner, out var hashedId);

            return(fixtures.CheckEmployerAccountTeamRepository(async repo =>
            {
                var member = await repo.GetMember(hashedId, email, true);
                Assert.IsNotNull(member);
                Assert.AreEqual(email, member.Email);
            }));
        }