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; }
public void throws_exception_when_setting_InPracticeSince_invalid([Values("1/1/1850", "1/1/9999")] string date) { var inPracticeDate = DateTime.Parse(date); var provider = new Provider(); provider.SetInPracticeSince(inPracticeDate); }
public void throws_exception_when_setting_InPracticeSince_future() { var inPracticeDate = DateTime.Now.AddDays(1); var provider = new Provider(); provider.SetInPracticeSince(inPracticeDate); }
public void can_set_InPracticeSince() { var inPracticeDate = new DateTime(2000,1,1); var provider = new Provider(); provider.SetInPracticeSince(inPracticeDate); Assert.AreEqual(inPracticeDate, provider.InPracticeSince); }