Beispiel #1
0
        public void GetSession_SessionDoesNotExistInMemory_SessionShouldBeReadFromFile()
        {
            var sessionId = "SessionId";
            var session   = new Session
            {
                Begin = DateTime.Now,
                End   = DateTime.Now,
                Id    = sessionId
            };

            dataProvider.AddSession(session);
            inMemoryStorage.Clear();

            var result = subject.GetSession(sessionId);

            result.Should().NotBeNull();
            result.Id.Should().Be(sessionId);
        }