Exemple #1
0
 public static Dictionary <ResourceId, Func <bool, Dictionary <string, object> > > GetMandatorySystemFields(Func <OptionDataCollection> processPhaseInfoProvider, int testUserId = CommonConstants.TestUserId)
 {
     return(new Dictionary <ResourceId, Func <bool, Dictionary <string, object> > >
     {
         [ResourceId.Client] = (isAlt) => new Dictionary <string, object>
         {
             ["P_Name"] = "Test Client" + (isAlt ? " Alt" : string.Empty),
             ["P_Owner"] = testUserId
         },
         [ResourceId.Recruiter] = (isAlt) => new Dictionary <string, object>
         {
             ["P_Name"] = "Test Client" + (isAlt ? " Alt" : string.Empty),
             ["P_Owner"] = testUserId,
             ["P_Client"] = new CreateRecordRequest.Reference($"{ResourceId.Client}{(isAlt ? " Alt" : string.Empty)}")
         },
         [ResourceId.Job] = (isAlt) => new Dictionary <string, object>
         {
             ["P_Position"] = "Test Job" + (isAlt ? " Alt" : string.Empty),
             ["P_Owner"] = testUserId,
             ["P_Client"] = new CreateRecordRequest.Reference($"{ResourceId.Client}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Recruiter"] = new CreateRecordRequest.Reference($"{ResourceId.Recruiter}{(isAlt ? " Alt" : string.Empty)}")
         },
         [ResourceId.Person] = (isAlt) => new Dictionary <string, object>
         {
             ["P_Name"] = "Test Person" + (isAlt ? " Alt" : string.Empty),
             ["P_Owner"] = testUserId,
         },
         [ResourceId.Resume] = (isAlt) => new Dictionary <string, object>
         {
             ["P_Owner"] = testUserId,
             ["P_Candidate"] = new CreateRecordRequest.Reference($"{ResourceId.Person}{(isAlt ? " Alt" : string.Empty)}")
         },
         [ResourceId.Process] = (isAlt) => new Dictionary <string, object>
         {
             ["P_Owner"] = testUserId,
             ["P_Client"] = new CreateRecordRequest.Reference($"{ResourceId.Client}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Recruiter"] = new CreateRecordRequest.Reference($"{ResourceId.Recruiter}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Job"] = new CreateRecordRequest.Reference($"{ResourceId.Job}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Candidate"] = new CreateRecordRequest.Reference($"{ResourceId.Person}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Resume"] = new CreateRecordRequest.Reference($"{ResourceId.Resume}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Phase"] = processPhaseInfoProvider()
         },
         [ResourceId.Sales] = (isAlt) => new Dictionary <string, object>
         {
             ["P_Owner"] = testUserId,
             ["P_Client"] = new CreateRecordRequest.Reference($"{ResourceId.Client}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Recruiter"] = new CreateRecordRequest.Reference($"{ResourceId.Recruiter}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Job"] = new CreateRecordRequest.Reference($"{ResourceId.Job}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Resume"] = new CreateRecordRequest.Reference($"{ResourceId.Resume}{(isAlt ? " Alt" : string.Empty)}"),
             ["P_Candidate"] = new CreateRecordRequest.Reference($"{ResourceId.Person}{(isAlt ? " Alt" : string.Empty)}")
         },
         [ResourceId.Activity] = (isAlt) => new Dictionary <string, object>
         {
             ["P_Title"] = "Test Activity" + (isAlt ? " Alt" : string.Empty),
             ["P_Owner"] = testUserId,
             ["P_FromDate"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
         },
         [ResourceId.Contract] = (isAlt) => new Dictionary <string, object>
         {
             ["P_Name"] = "Test Contract" + (isAlt ? " Alt" : string.Empty),
             ["P_Client"] = new CreateRecordRequest.Reference($"{ResourceId.Client}{(isAlt ? " Alt" : string.Empty)}")
         }
     });
 }