Beispiel #1
0
 private static Func <ISession <PrivateAuthentication>, ITest, Task <List <ulong> > > CreatePhaseFlow(Dictionary <string, List <string> > resourceId)
 {
     return(async(session, test) =>
     {
         return (await session.CallAsync((CreatePhaseFlowRequest.Builder().AddPhaseFlow(resourceId).Build()))).Ids;
     });
 }
Beispiel #2
0
        public async Task CreatePhaseFlow()
        {
            // create request
            var builer = CreatePhaseFlowRequest.Builder();

            //builer.AppendFlow(500, new List<ulong> { 500, 513, 514, 515, 406, 407, 405, 404 });
            builer.AppendFlow("Option.P_ClientPhase", new List <string> {
                "Option.P_ClientContact", "Option.P_ClientNegotiation", "Option.P_ClientLost", "Option.P_ClientSuccessForSale"
            });
            var request = builer.Build().Content;

            //Get session
            using (var client = PrivateClient.CreateClient(new PrivateServerSettings()
            {
                ServerUrl = server, LoggerFactory = TestLoggerFactoryAttribute.CurrentLoggerFactory
            }))
                using (var session = client.CreateSession(auth))
                {
                    //Send Request
                    var response = await session.CallAsync(builer.Build());

                    Assert.That(response, Is.Not.Null, "response is null or empty!");
                    Assert.That(response.ResultCode, Is.EqualTo(204), "Not Match success code!");
                }
        }
Beispiel #3
0
 private static Func <ISession <PrivateAuthentication>, ITest, Task <List <ulong> > > CreatePhaseFlow(Dictionary <ulong, List <ulong> > phaseFlows)
 {
     return(async(session, test) =>
     {
         int resultCode = (await session.CallAsync((CreatePhaseFlowRequest.Builder().AddPhaseFlow(phaseFlows).Build()))).ResultCode;
         return phaseFlows.Keys.ToList();
     });
 }