Ejemplo n.º 1
0
 private static async Task DeletePhaseFlow(ISession <PrivateAuthentication> session, ITest test, List <ulong> collectionToDispose)
 {
     foreach (ulong item in collectionToDispose)
     {
         await session.CallAsync(DeletePhaseFlowRequest.Builder().AddFlowId((int)item));
     }
 }
Ejemplo n.º 2
0
        public async Task DeletePhaseFlow()
        {
            // create request
            var builer = DeletePhaseFlowRequest.Builder();

            builer.AddFlowId(500).IsRecursive(true);
            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.Data.Count, Is.GreaterThan(0), "Response Count is empty!");
                    Assert.That(response.Data.Values.Where(v => v.Depth == "1").Single().FlowItems, Is.Null, "Flow is not null!");
                }
        }