Example #1
0
        public void OnSerializingMethod_Sets_PhoneTypeString_Member_From_PhoneType_Member_None()
        {
            var phoneColumn = new PhoneColumn()
            {
                PhoneNumber = phoneNumber
            };

            Assert.AreEqual(PhoneColumnType.Undefined, phoneColumn.PhoneType);
            Assert.IsNull(phoneColumn.PhoneTypeString);

            phoneColumn.OnSerializingMethod(new StreamingContext());

            Assert.IsNull(phoneColumn.PhoneTypeString);
        }
Example #2
0
        public void OnSerializingMethod_Sets_PhoneTypeString_Member_From_PhoneType_Member()
        {
            var phoneColumn = new PhoneColumn()
            {
                PhoneNumber = phoneNumber,
                PhoneType = PhoneColumnType.Work
            };

            Assert.IsNull(phoneColumn.PhoneTypeString);

            phoneColumn.OnSerializingMethod(new StreamingContext());

            Assert.AreEqual("Work", phoneColumn.PhoneTypeString);
        }