Example #1
0
        public void GetHashcodeTest()
        {
            PersonInfo personInfo1 = new PersonInfo();

            personInfo1.FirstGivenName   = "test-firstGivenName";
            personInfo1.MiddleName       = "test-middleName";
            personInfo1.FirstSurName     = "test-firstSurName";
            personInfo1.SecondSurname    = "test-secondSurname";
            personInfo1.ISOLatin1Name    = "test-iSOLatin1Name";
            personInfo1.DayOfBirth       = 15;
            personInfo1.MonthOfBirth     = 3;
            personInfo1.YearOfBirth      = 1994;
            personInfo1.MinimumAge       = 18;
            personInfo1.Gender           = "test-gender";
            personInfo1.AdditionalFields = new PersonInfoAdditionalFields(fullName: "test-fullName");

            PersonInfo personInfo2 = new PersonInfo();

            personInfo2.FirstGivenName   = "test-firstGivenName";
            personInfo2.MiddleName       = "test-middleName";
            personInfo2.FirstSurName     = "test-firstSurName";
            personInfo2.SecondSurname    = "test-secondSurname";
            personInfo2.ISOLatin1Name    = "test-iSOLatin1Name";
            personInfo2.DayOfBirth       = 15;
            personInfo2.MonthOfBirth     = 3;
            personInfo2.YearOfBirth      = 1994;
            personInfo2.MinimumAge       = 18;
            personInfo2.Gender           = "test-gender";
            personInfo2.AdditionalFields = new PersonInfoAdditionalFields(fullName: "test-fullName");

            Assert.Equal(personInfo1.GetHashCode(), personInfo2.GetHashCode());
        }
 public override int GetHashCode()
 {
     return(PhotoName.GetHashCode() ^ Code.GetHashCode() ^
            IssueInfo.GetHashCode() ^ PersonInfo.GetHashCode() ^
            LocationInfo.GetHashCode() ^ FamilyInfo.GetHashCode());
 }