コード例 #1
0
        public void RecorderInvokesTestRun2Times()
        {
            var fakeWrapper = new FakeFiddlerWrapper();
            var rec         = new TestRecorder(fakeWrapper);
            int invokeCount = 0;

            rec.SetTestCallback((q) => {
                invokeCount++;
            });

            rec.Record();

            Assert.That(invokeCount, Is.EqualTo(2));
        }
コード例 #2
0
        public void RecorderReturnsAllSessions()
        {
            var fakeWrapper = new FakeFiddlerWrapper();

            fakeWrapper.AddSession(CreateSession());
            fakeWrapper.AddSession(CreateSession());

            var rec = new TestRecorder(fakeWrapper);

            rec.SetTestCallback((q) => {});

            rec.Record();

            Assert.That(rec.GetSessions().ToList(), Has.Count.EqualTo(2));
        }