コード例 #1
0
        public void IsEmptyCallsWrappedSession()
        {
            // given
            var target = new SessionWrapper(wrappedSession);

            target.ClearCapturedData();

            // when, then
            Assert.That(wrappedSession.IsEmpty, Is.True);
            Assert.That(target.IsEmpty, Is.True);
        }
コード例 #2
0
        public void ClearCapturedDataClearsDataFromSession()
        {
            // given
            var target = new SessionWrapper(wrappedSession);

            wrappedSession.EnterAction("foo").LeaveAction();

            // ensure data is not empty
            Assert.That(wrappedSession.IsEmpty, Is.False);

            // when
            target.ClearCapturedData();

            // verify forwarded calls - now wrapped session must be empty
            Assert.That(wrappedSession.IsEmpty, Is.True);
        }