public void should_persist()
 {
     var individual = new Individual("Name", "Surname", "IdNumber");
     new PersistenceSpecification<Individual>(Session, new CustomEqualityComparer())
         .CheckProperty(c => c.Name, "Name")
         .CheckProperty(c => c.Surname, "Surname")
         .CheckProperty(c => c.IdNumber, "IdNumber")
         .CheckList(c => c.Addresses, new HashSet<IndividualAddress>(new[] { new IndividualAddress(individual, new Address("Line1", "Line2", "Suburb", "City", new Country("South Africa"), "Postal code", new Province("Gauteng")), AddressType.Physical), }))
         .VerifyTheMappings(individual);
 }
 public IndividualEmail(Individual individual, string email, Guid id = new Guid()) : base(id)
 {
     Individual = individual;
     Email = email;
 }
 public IndividualContactNumber(Individual individual, string contactNumber, ContactNumberType contactNumberType, Guid id = new Guid()) : base(id)
 {
     Individual = individual;
     ContactNumber = contactNumber;
     ContactNumberType = contactNumberType;
 }
 public IndividualAddress(Individual individual, Address address, AddressType addressType)
 {
     Individual = individual;
     Address = address;
     AddressType = addressType;
 }
 public User(string firstName, string lastName, string idNumber, string contactNumber, string userName,
     string password,
     bool? isActive, UserType userType, HashSet<Role> roles, Guid id = new Guid())
     : base(id)
 {
     Individual = new Individual(firstName, lastName, idNumber);
     ContactNumber = contactNumber;
     UserName = userName;
     Password = password;
     IsActive = isActive;
     UserType = userType;
     Roles = roles;
 }