Esempio n. 1
0
 public static void CapturePropertiesForAdd(ProviderV2 source, Provider provider)
 {
     provider.Npi = (string.IsNullOrEmpty(source.Npi) ? null : (long?)long.Parse(source.Npi, CultureInfo.InvariantCulture)) ?? provider.Npi;
     provider.SetName(source.NamePrefix, source.FirstName, source.MiddleName, source.LastName, source.NameSuffix, source.AdditionalSuffix);
     provider.AdditionalInformation = source.AdditionalInformation;
     provider.SetDateOfBirth(ConvertToNullibleDateTime(source.DateOfBirth, null, "DateOfBirth", provider.FullName));
     provider.SetEmail(source.Email);
     provider.SetFax(source.Fax);
     provider.SetInPracticeSince(ConvertToNullibleDateTime(source.InPracticeSince, null, "InPracticeSince", provider.FullName));
     provider.IsEnabled = ConvertToBool(source.IsEnabled, true, "IsEnabled", provider.FullName);
     provider.PhilosophyOfCare = source.PhilosophyOfCare;
     provider.SetPhone(source.Phone);
     provider.SetWebsite(source.Website);
     provider.SetAboutMe(source.AboutMe);
     provider.VideoContent = source.VideoContent;
     provider.UpdatedDate = DateTime.UtcNow;
     provider.Keywords = source.Keywords;
     provider.CustomKeywords = source.CustomKeywords;
     provider.ExcludedKeywords = source.ExcludedKeywords;
     provider.ImageUrl = source.ImageUrl;
     provider.PictureId = ConvertToNullibleInt(source.PictureId, "PictureId", source.LastName);
     provider.Custom1 = source.Custom1;
     provider.Custom2 = source.Custom2;
     provider.Custom3 = source.Custom3;
 }
Esempio n. 2
0
 public void throws_exception_when_setting_date_of_birth_invalid([Values("1/1/1850", "1/1/9999")] string date)
 {
     var dateOfBirth = DateTime.Parse(date);
     var provider = new Provider();
     provider.SetDateOfBirth(dateOfBirth);
 }
Esempio n. 3
0
 public void throws_exception_when_setting_date_of_birth_future()
 {
     var dateOfBirth = DateTime.Now.AddDays(1);
     var provider = new Provider();
     provider.SetDateOfBirth(dateOfBirth);
 }
Esempio n. 4
0
 public void can_set_date_of_birth()
 {
     var dateOfBirth = new DateTime(1970, 1, 1);
     var provider = new Provider();
     provider.SetDateOfBirth(dateOfBirth);
     Assert.AreEqual(dateOfBirth, provider.DateOfBirth);
 }