public void RemoveFromSessionDoesNotThrowForUnexistingKeys() { IStoryBoard board = new StoryBoardBase(); board.StoreToSession(SessionId.Key1, "Caramel"); Assert.DoesNotThrow(() => board.RemoveFromSession(SessionId.Key2)); }
public void RemoveFromSessionRemovesExistingKey() { IStoryBoard board = new StoryBoardBase(); board.StoreToSession(SessionId.Key1, "Caramel"); bool result = board.TryLoadFromSession(SessionId.Key1, out string value); Assert.IsTrue(result); Assert.AreEqual("Caramel", value); board.RemoveFromSession(SessionId.Key1); result = board.TryLoadFromSession(SessionId.Key1, out value); Assert.IsFalse(result); }