Exemplo n.º 1
0
        public bool Equals(ExTest other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            var returned = Id == other.Id &&
                           TestId == other.TestId &&
                           ExecutionDate.Equals(other.ExecutionDate) &&
                           Name == other.Name &&
                           State == other.State;

            return(ExQuestions.Aggregate(returned, (current, question) => current && other.ExQuestions.Contains(question)));
        }