예제 #1
0
 private static Func <ISession <PrivateAuthentication>, ITest, Task <IReadOnlyDictionary <int, PhaseFlowContent> > > ReadPhaseFlow(int resourceId)
 {
     return(async(session, test) =>
     {
         return (await session.CallAsync((GetPhaseFlowRequest.Builder().AddResourceId(resourceId).Build()))).Data;
     });
 }
예제 #2
0
        public async Task GetPhaseFlow()
        {
            // create request
            var builer = GetPhaseFlowRequest.Builder();

            builer.AddResourceId((int)ResourceId.Client);
            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 flows = await session.CallAsync(builer.Build());

                    Assert.That(flows, Is.Not.Null, "Flow is null!");
                    Assert.That(flows.Data.Count, Is.GreaterThan(0), "Flows Count is  empty!");
                    Assert.That(flows.Data.Values, Is.Not.Null.And.Not.Empty, "Flows.Values is null or empty!");
                }
        }