public void New_Deserializes_PhoneColumn_For_No_Type_Json() { PhoneColumn phone = new PhoneColumn(jsonPhoneNoType); Assert.AreEqual(phoneNumber, phone.PhoneNumber); Assert.AreEqual(PhoneColumnType.Undefined, phone.PhoneType); }
public void New_Deserializes_PhoneColumn_For_Valid_Type_Json() { PhoneColumn phone = new PhoneColumn(jsonPhoneCellType); Assert.AreEqual(phoneNumber, phone.PhoneNumber); Assert.AreEqual(PhoneColumnType.Cell, phone.PhoneType); }
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); }
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); }
public void Init() { instance = new PhoneColumn(); }