Esempio n. 1
0
 public void MobileTest()
 {
     UserContactDetail target = new UserContactDetail(); // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     target.Mobile = expected;
     actual = target.Mobile;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Esempio n. 2
0
 public void IdTest()
 {
     UserContactDetail target = new UserContactDetail(); // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     target.Id = expected;
     actual = target.Id;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the UserContactDetails EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUserContactDetails(UserContactDetail userContactDetail)
 {
     base.AddObject("UserContactDetails", userContactDetail);
 }
 /// <summary>
 /// Create a new UserContactDetail object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="telephone">Initial value of the Telephone property.</param>
 /// <param name="mobile">Initial value of the Mobile property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 public static UserContactDetail CreateUserContactDetail(global::System.Int32 id, global::System.String telephone, global::System.String mobile, global::System.Int32 userId)
 {
     UserContactDetail userContactDetail = new UserContactDetail();
     userContactDetail.Id = id;
     userContactDetail.Telephone = telephone;
     userContactDetail.Mobile = mobile;
     userContactDetail.UserId = userId;
     return userContactDetail;
 }
        /// <summary>
        /// Insert specified user contact details in database
        /// </summary>
        /// <param name="dto">dto data for user contact details</param>
        public void InsertUsersContactDetails(UserContactDetailsDto dto)
        {
            try
            {
                //Before any action, it must be updated because calls from contract uses
                //only one instance of UserManager.
                dbContext.Refresh(System.Data.Objects.RefreshMode.StoreWins, dbContext.UserContactDetails);
                UserContactDetail cd = new UserContactDetail();
                cd.Telephone = dto.Telephone;
                cd.Mobile = dto.Mobile;
                cd.UserId = dto.UserId;

                //Adds new user contact details to context
                dbContext.UserContactDetails.AddObject(cd);

                //saves changes.
                dbContext.SaveChanges();
            }
            catch (Exception exception)
            {
                throw new Exception("UserDataMenagers: " + exception.Message);
            }
        }
Esempio n. 6
0
 public void UserReferenceTest()
 {
     UserContactDetail target = new UserContactDetail(); // TODO: Initialize to an appropriate value
     EntityReference<User> expected = null; // TODO: Initialize to an appropriate value
     EntityReference<User> actual;
     target.UserReference = expected;
     actual = target.UserReference;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Esempio n. 7
0
 public void UserContactDetailConstructorTest()
 {
     UserContactDetail target = new UserContactDetail();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }