public void Dispose_should_do_nothing() { var subject = new CoreServerSession(); subject.Dispose(); subject.WasUsed(); // call some method to assert no ObjectDisposedException is thrown }
public void WasUsed_should_have_expected_result() { var subject = new CoreServerSession(); subject.WasUsed(); subject.LastUsedAt.Should().BeCloseTo(DateTime.UtcNow); }
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); }