Example #1
0
        /// <summary>
        /// Returns true if DutyRequest instances are equal
        /// </summary>
        /// <param name="other">Instance of DutyRequest to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DutyRequest other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     WorkerId == other.WorkerId ||
                     WorkerId != null &&
                     WorkerId.Equals(other.WorkerId)
                     ) &&
                 (
                     Duty == other.Duty ||
                     Duty != null &&
                     Duty.Equals(other.Duty)
                 ));
        }
        public void WorkerId_implicitly_cast_to_string_has_the_same_string_contents()
        {
            string id = new WorkerId(workerIdString);

            Assert.IsTrue(id.Equals(workerIdString));
        }