Esempio n. 1
0
        public void GetRoleOfMember_ReturnsRole_Developer()
        {
            var context = GetContext();

            try
            {
                ProjectUserRepository repo = new ProjectUserRepository(context);

                var role = repo.GetRoleOfMember("421cb65f-a76d-4a73-8a1a-d792f37ef992", 1).Result;

                Assert.Equal(AppUserRole.Developer.Id, role.Id);
            }
            finally
            {
                context.Database.EnsureDeleted();
                context.Dispose();
            }
        }
Esempio n. 2
0
        public void GetRoleOfMember_ReturnsRole_NoMember()
        {
            var context = GetContext();

            try
            {
                ProjectUserRepository repo = new ProjectUserRepository(context);

                var role = repo.GetRoleOfMember("no-user-in-project", 1).Result;

                Assert.Equal(AppUserRole.None.Id, role.Id);
            }
            finally
            {
                context.Database.EnsureDeleted();
                context.Dispose();
            }
        }
Esempio n. 3
0
        public void GetRoleOfMember_ReturnsRole_Owner()
        {
            var context = GetContext();

            try
            {
                ProjectUserRepository repo = new ProjectUserRepository(context);

                var role = repo.GetRoleOfMember("2138b181-4cee-4b85-9f16-18df308f387d", 1).Result;

                Assert.Equal(AppUserRole.Owner.Id, role.Id);
            }
            finally
            {
                context.Database.EnsureDeleted();
                context.Dispose();
            }
        }