Beispiel #1
0
        public void Dispose_should_do_nothing()
        {
            var subject = new CoreServerSession();

            subject.Dispose();

            subject.WasUsed(); // call some method to assert no ObjectDisposedException is thrown
        }
Beispiel #2
0
        public void WasUsed_should_have_expected_result()
        {
            var subject = new CoreServerSession();

            subject.WasUsed();

            subject.LastUsedAt.Should().BeCloseTo(DateTime.UtcNow);
        }
Beispiel #3
0
        public void LastUsedAt_should_return_expected_result_when_WasUsed_has_been_called()
        {
            var subject = new CoreServerSession();

            subject.WasUsed();

            var result = subject.LastUsedAt;

            result.Should().BeCloseTo(DateTime.UtcNow);
        }