Example #1
0
 public SearchQueryDateTime(SearchParameter SearchParameter, Bug.Common.Enums.ResourceType ResourceContext, string RawValue, IFhirDateTimeFactory IFhirDateTimeFactory)
     : base(SearchParameter, ResourceContext, RawValue)
 {
     this.SearchParamTypeId    = Bug.Common.Enums.SearchParamType.Date;
     this.ValueList            = new List <SearchQueryDateTimeValue>();
     this.IFhirDateTimeFactory = IFhirDateTimeFactory;
 }
 public SearchQueryFactory(IFhirUriFactory IFhirUriFactory,
                           IResourceTypeSupport IResourceTypeSupport,
                           ISearchParameterCache ISearchParameterCache,
                           IKnownResource IKnownResource,
                           IFhirDateTimeFactory IFhirDateTimeFactory,
                           ISearchParameterRepository ISearchParameterRepository)
 {
     this.IFhirUriFactory            = IFhirUriFactory;
     this.IResourceTypeSupport       = IResourceTypeSupport;
     this.ISearchParameterCache      = ISearchParameterCache;
     this.IKnownResource             = IKnownResource;
     this.IFhirDateTimeFactory       = IFhirDateTimeFactory;
     this.ISearchParameterRepository = ISearchParameterRepository;
 }
        public static SearchQueryFactory Get(ISearchParameterCache ISearchParameterCache)
        {
            Bug.Common.Interfaces.IFhirUriFactory IFhirUriFactory = FhirUriFactory_Factory.Get(TestData.BaseUrlServer, new string[]
            {
                ResourceType.Observation.GetCode(),
                ResourceType.Patient.GetCode(),
                ResourceType.Device.GetCode(),
                ResourceType.Encounter.GetCode()
            });

            IResourceTypeSupport  IResourceTypeSupport = new ResourceTypeSupport();
            Mock <IKnownResource> IKnownResourceMock   = IKnownResource_MockFactory.Get();
            IFhirDateTimeFactory  IFhirDateTimeFactory = IFhirDateTimeFactory_Factory.Get(TimeSpan.FromHours(10));
            //This mock below 'ISearchParameterRepository' is not fully formed!
            Mock <ISearchParameterRepository> ISearchParameterRepositoryMock = ISearchParameterRepository_MockFactory.Get();

            return(new SearchQueryFactory(IFhirUriFactory, IResourceTypeSupport, ISearchParameterCache, IKnownResourceMock.Object, IFhirDateTimeFactory, ISearchParameterRepositoryMock.Object));
        }