public virtual void test_parse()
        {
            LegalEntityId test = LegalEntityId.parse(STANDARD_ID.ToString());

            assertEquals(test.StandardId, STANDARD_ID);
            assertEquals(test.ReferenceDataType, typeof(LegalEntity));
            assertEquals(test.ToString(), STANDARD_ID.ToString());
        }
        //-------------------------------------------------------------------------
        public virtual void test_of_strings()
        {
            LegalEntityId test = LegalEntityId.of("A", "1");

            assertEquals(test.StandardId, STANDARD_ID);
            assertEquals(test.ReferenceDataType, typeof(LegalEntity));
            assertEquals(test.ToString(), STANDARD_ID.ToString());
        }
 private SimpleLegalEntity(LegalEntityId legalEntityId, string name, Country country)
 {
     JodaBeanUtils.notNull(legalEntityId, "legalEntityId");
     JodaBeanUtils.notNull(name, "name");
     JodaBeanUtils.notNull(country, "country");
     this.legalEntityId = legalEntityId;
     this.name          = name;
     this.country       = country;
 }
        //-------------------------------------------------------------------------
        public virtual void test_equalsHashCode()
        {
            LegalEntityId a  = LegalEntityId.of("A", "1");
            LegalEntityId a2 = LegalEntityId.of("A", "1");
            LegalEntityId b  = LegalEntityId.of("B", "1");

            assertEquals(a.Equals(a), true);
            assertEquals(a.Equals(a2), true);
            assertEquals(a.Equals(b), false);
            assertEquals(a.Equals(null), false);
            assertEquals(a.Equals(ANOTHER_TYPE), false);
        }
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 866287159:         // legalEntityId
                    this.legalEntityId = (LegalEntityId)newValue;
                    break;

                case 3373707:         // name
                    this.name = (string)newValue;
                    break;

                case 957831062:         // country
                    this.country = (Country)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 /// <summary>
 /// Obtains an instance. </summary>
 /// <param name="legalEntityId">  the value of the property, not null </param>
 /// <param name="name">  the value of the property, not null </param>
 /// <param name="country">  the value of the property, not null </param>
 /// <returns> the instance </returns>
 public static SimpleLegalEntity of(LegalEntityId legalEntityId, string name, Country country)
 {
     return(new SimpleLegalEntity(legalEntityId, name, country));
 }