コード例 #1
0
 protected override async Task RunScenario()
 {
     for (var i = 200; i < 400; i++)
     {
         ClosedPcts.Add(TestSubject.ClosedPct);
         ShouldAccepts.Add(TestSubject.ShouldAccept());
         TestSubject.LogSuccessResponse(i.ToString());
         await Task.Delay(5);
     }
 }
コード例 #2
0
        protected override async Task RunScenario()
        {
            for (var i = 0; i < 100; i++)
            {
                ClosedPcts.Add(TestSubject.ClosedPct);
                ShouldAccepts.Add(TestSubject.ShouldAccept());
                TestSubject.LogFailureResponse(HttpStatusCode.InternalServerError.ToString());
                await Task.Delay(5);
            }

            for (var i = 0; i < 100; i++)
            {
                ClosedPcts.Add(TestSubject.ClosedPct);
                ShouldAccepts.Add(TestSubject.ShouldAccept());
                TestSubject.LogSuccessResponse(HttpStatusCode.OK.ToString());
                await Task.Delay(5);
            }
        }
コード例 #3
0
 public void should_end_by_accepting_requests()
 {
     ShouldAccepts.Last().ShouldBe(true);
 }
コード例 #4
0
 public void should_start_by_accepting_requests()
 {
     ShouldAccepts.First().ShouldBe(true);
 }
コード例 #5
0
 public void should_remain_accepting_all_requests()
 {
     Assert.That(ShouldAccepts.All(c => c), Is.True);
 }
コード例 #6
0
 public void should_end_by_not_accepting_requests()
 {
     ShouldAccepts.Last().ShouldBe(false);
 }