Exemplo n.º 1
0
        public void NullDoesntChangeArray()
        {
            var item = new Company();

            item.AddEmail(null, EmailTypeEnum.PRIV);
            item.AddEmail("", EmailTypeEnum.PRIV);

            var value = item.Fields.Find(x => x.Id == (int)CompanySystemFields.Email);

            Assert.IsNull(value);
        }
Exemplo n.º 2
0
        public void AddTwoEmailAndSameType()
        {
            var item = new Company();

            item.AddEmail("*****@*****.**", EmailTypeEnum.PRIV);
            item.AddEmail("89995556633", EmailTypeEnum.PRIV);

            var value1 = item.Fields.Find(x => x.Id == (int)CompanySystemFields.Email).Values[0].Enum;
            var value2 = item.Fields.Find(x => x.Id == (int)CompanySystemFields.Email).Values[1].Enum;

            Assert.AreEqual(value1, (int)EmailTypeEnum.PRIV);
            Assert.AreEqual(value2, (int)EmailTypeEnum.PRIV);
        }