コード例 #1
0
        public void Init()
        {
            var locManager = new Mock<ILocalizationManager>();
            locManager.Setup(
                s => s.GetValidatorTranslationTEST(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>()))
                .Returns("Some test string");
            this.validator = new PersonNameValidator(locManager.Object);

            this.model = ClassPropertyInitializator.SetProperties<PersonName>(new PersonName());
        }
コード例 #2
0
        /// <summary>
        /// Object Equals overrive. Specific equals class implementation
        /// </summary>
        /// <param name="obj">Object input</param>
        /// <returns>True if this and obj equals</returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            OLEChildData p = obj as OLEChildData;

            if (p == null)
            {
                return false;
            }

            if (this.PersonName == null)
            {
                this.PersonName = new PersonName();
            }

            return (this.Birthday == p.Birthday) &&
                    (this.CurrentCitizenship == p.CurrentCitizenship) &&
                    (this.Gender == p.Gender) &&
                    (this.MigrationIntentions == p.MigrationIntentions) &&
                    (this.PersonCode == p.PersonCode) &&
                    (this.PersonName.Equals(p.PersonName));
        }