public void EqualsObjectCastTest() { Location location = new Location(city: "test-city"); TestEntityDataFields testEntityDataFields = new TestEntityDataFields(location: location); object obj = new TestEntityDataFields(location: location); Assert.True(testEntityDataFields.Equals(obj)); }
public void EqualsTest() { Location location = new Location(city: "test-city"); TestEntityDataFields location1 = new TestEntityDataFields(location: location); Assert.Equal(location1, location1); Assert.Equal(location1, new TestEntityDataFields(location: location)); Assert.NotEqual(location1, new TestEntityDataFields(location: new Location(city: "test-city1"))); Assert.False(location1.Equals(null)); }
public void GetHashcodeTest() { List <NationalId> nationalIds = new List <NationalId>(); Dictionary <string, Dictionary <string, string> > countrySpecific = new Dictionary <string, Dictionary <string, string> > { { "test-outerKey1", new Dictionary <string, string> { { "test-key1", "test-value1" }, { "test-key2", "test-value2" } } }, { "test-outerKey2", new Dictionary <string, string> { { "test-key1", "test-value1" }, { "test-key2", "test-value2" } } }, { "test-outerKey3", new Dictionary <string, string> { { "test-key1", "test-value1" }, { "test-key2", "test-value2" } } } }; TestEntityDataFields testEntityDataFields1 = new TestEntityDataFields(); testEntityDataFields1.TestEntityName = "test-testEntityName"; testEntityDataFields1.PersonInfo = new PersonInfo(firstGivenName: "test-firstGivenName"); testEntityDataFields1.Location = new Location(city: "test-city"); testEntityDataFields1.Communication = new Communication(emailAddress: "test-emailAddress"); testEntityDataFields1.DriverLicence = new DriverLicence(number: "test-number"); testEntityDataFields1.NationalIds = nationalIds; testEntityDataFields1.Passport = new Passport(mrz1: "test-mrz1"); testEntityDataFields1.Document = new Document(documentType: "test-documentType"); testEntityDataFields1.Business = new Business(businessName: "test-businessName"); testEntityDataFields1.CountrySpecific = countrySpecific; TestEntityDataFields testEntityDataFields2 = new TestEntityDataFields(); testEntityDataFields2.TestEntityName = "test-testEntityName"; testEntityDataFields2.PersonInfo = new PersonInfo(firstGivenName: "test-firstGivenName"); testEntityDataFields2.Location = new Location(city: "test-city"); testEntityDataFields2.Communication = new Communication(emailAddress: "test-emailAddress"); testEntityDataFields2.DriverLicence = new DriverLicence(number: "test-number"); testEntityDataFields2.NationalIds = nationalIds; testEntityDataFields2.Passport = new Passport(mrz1: "test-mrz1"); testEntityDataFields2.Document = new Document(documentType: "test-documentType"); testEntityDataFields2.Business = new Business(businessName: "test-businessName"); testEntityDataFields2.CountrySpecific = countrySpecific; Assert.Equal(testEntityDataFields1.GetHashCode(), testEntityDataFields2.GetHashCode()); }
public TestEntityDataFieldsTests() { testEntityDataFields = new TestEntityDataFields(); }