コード例 #1
0
        protected override void OnWaitForClientConnectionCompleted(TestContext ctx, Task task)
        {
            if (Parameters.ExpectClientAlert != null)
            {
                MonoConnectionHelper.ExpectAlert(ctx, task, Parameters.ExpectClientAlert.Value, "expect client alert");
                throw new ConnectionFinishedException();
            }

            base.OnWaitForClientConnectionCompleted(ctx, task);
        }
コード例 #2
0
        protected override void OnWaitForServerConnectionCompleted(TestContext ctx, Task task)
        {
            if (Parameters.ExpectClientAlert != null)
            {
                ctx.Assert(task.IsFaulted, "expecting exception");
                throw new ConnectionFinishedException();
            }

            if (Parameters.ExpectServerAlert != null)
            {
                MonoConnectionHelper.ExpectAlert(ctx, task, Parameters.ExpectServerAlert.Value, "expect server alert");
                throw new ConnectionFinishedException();
            }

            base.OnWaitForServerConnectionCompleted(ctx, task);
        }