Beispiel #1
0
        public void GetMembersOfProject_ReturnsEmptyResIfNoProjects()
        {
            var context = GetContext();

            try
            {
                ProjectUserRepository repo = new ProjectUserRepository(context);

                var res = repo.GetMembersOfProject(123).Result;

                Assert.Empty(res);
            }
            finally
            {
                context.Database.EnsureDeleted();
                context.Dispose();
            }
        }
Beispiel #2
0
        public void GetMembersOfProject_ReturnsListOfMembers()
        {
            var context = GetContext();

            try
            {
                ProjectUserRepository repo = new ProjectUserRepository(context);

                var res = repo.GetMembersOfProject(2).Result;

                Assert.Equal(2, res.Count());
                Assert.True(
                    res.Any(m => m.Id == "2138b181-4cee-4b85-9f16-18df308f387d") &&
                    res.Any(m => m.Id == "2514591e-29f0-4a63-b0ad-87a3e7ebec3d"));
            }
            finally
            {
                context.Database.EnsureDeleted();
                context.Dispose();
            }
        }