Example #1
0
        public void Ensure_GetUserResult_Is_Valid()
        {
            var result = new GetGitUserResult()
            {
                User = new GitUserDto()
                {
                    AvatarUrl = "Null",
                    Name      = "Name",
                    Location  = "Location"
                }
            };

            Assert.IsTrue(result.IsValid());
        }
Example #2
0
        public static bool IsValid(this GetGitUserResult result)
        {
            var status = false;

            if (result.IsNotNull() && result.User.IsNotNull())
            {
                var user = result.User;

                if (user.Name.IsNotNullOrEmpty() || user.AvatarUrl.IsNotNullOrEmpty() || user.Location.IsNotNullOrEmpty())
                {
                    status = true;
                }
            }

            return(status);
        }