protected SetAndReleaseItemExclusiveTest()
        {
            Subject.SetAndReleaseItemExclusive(null, SessionId, new SessionStateStoreData(Items, new HttpStaticObjectsCollection(), (int)Timeout.TotalMinutes), LockId, NewItem);

            using (var session = DocumentStore.OpenSession())
            {
                PersistedSessionStateDocument = session.Load <SessionStateDocument>(SessionStateDocument.GenerateDocumentId(SessionId, ApplicationName));
            }
        }
Beispiel #2
0
        public ReleaseItemExclusive_when_lock_id_matches()
        {
            //call ReleaseItemExclusive with matching lockId
            Subject.ReleaseItemExclusive(null, SessionId, LockIdExisting);

            using (var session = DocumentStore.OpenSession())
            {
                PersistedSessionStateDocument = session.Load <SessionStateDocument>(SessionStateDocument.GenerateDocumentId(SessionId, ApplicationName));
            }
        }
        public ReleaseItemExclusive_when_lock_id_does_not_match()
        {
            //call ReleaseItemExclusive with a lockId that does not match
            Subject.ReleaseItemExclusive(null, SessionId, 3);

            using (var session = DocumentStore.OpenSession())
            {
                PersistedSessionStateDocument = session.Load <SessionStateDocument>(SessionStateDocument.GenerateDocumentId(SessionId, ApplicationName));
            }
        }