public void TestMethod1() { var model = new UpdatedPhoneNumberBindingModel { Number = "123-456-7890", PhoneNumberTypeId = PhoneNumberType.Home.Id, Id = 100, IsPrimary = true }; var user = new User(10); var instance = model.ToUpdatedPhoneNumber(user); Assert.AreEqual(model.Number, instance.Number); Assert.AreEqual(model.PhoneNumberTypeId, instance.PhoneNumberTypeId); Assert.AreEqual(model.Id, instance.Id); Assert.AreEqual(model.IsPrimary, instance.IsPrimary); Assert.AreEqual(user.Id, instance.Audit.User.Id); }
public Task <IHttpActionResult> PutUpdatePhoneNumberAsync([FromBody] UpdatedPhoneNumberBindingModel model) { return(phoneNumberHandler.HandleUpdatePhoneNumberAsync(model, this)); }