示例#1
0
        public void GetOwnerOfProject_ReturnsNullIfProjDoesntExist()
        {
            var context = GetContext();

            try
            {
                ProjectUserRepository repo = new ProjectUserRepository(context);

                var user = repo.GetOwnerOfProject(123).Result;

                Assert.Null(user);
            }
            finally
            {
                context.Database.EnsureDeleted();
                context.Dispose();
            }
        }
示例#2
0
        public void GetOwnerOfProject_ReturnsOwnerIfProjExists()
        {
            var context = GetContext();

            try
            {
                ProjectUserRepository repo = new ProjectUserRepository(context);

                var user = repo.GetOwnerOfProject(1).Result;

                Assert.Equal("2138b181-4cee-4b85-9f16-18df308f387d", user.Id);
            }
            finally
            {
                context.Database.EnsureDeleted();
                context.Dispose();
            }
        }